× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I agree, set the indicators on or off individually. And name them. Don't
manipulate them with MOVEA or some such. The teensy amount of time the
program saves by executing faster is way less that the amount of time the
next programmer spends trying to figure out what the heck was the last
programmer thinking when he did  THAT?!?!? 

Only other thing I will add is, that every program I get my hands on is
converted to /free with Linoma's RPG Toolbox, and if there are any
indicators used, they go into a pointer data structure:

      // Define indicators                                                 
     D P_Indicators    S               *   Inz(%ADDR(*IN))                 
     D Indicators      DS                  Based(P_Indicators)             
     D  Branch_Used                        Like(*IN) Overlay(Indicators:09)
     D  Job_Used                           Like(*IN) Overlay(Indicators:10)
     D  Format_A                           Like(*IN) Overlay(Indicators:11)
     D  Format_B                           Like(*IN) Overlay(Indicators:12)
     D  Format_C                           Like(*IN) Overlay(Indicators:13)
     D  Subfile_Clear                      Like(*IN) Overlay(Indicators:20)

      /Free
       // Read division master file.     
       Read Div;                         
                                         
       // Set branch or job# indicators. 
       Branch_Used = (Divbyn = 'Y');     
       Job_Used = (Divjyn = 'Y');        
                                         
       // Set contract format indicators.
       Format_A = (Divcnf = 'A');        
       Format_B = (Divcnf = 'B');        
       Format_C = (Divcnf = 'C');        

        // Clear subfile
       Subfile_Clear = *ON;   
       Write Ctlncc;          
       Subfile_Clear = *OFF;  
       Rrnnct = 0;            

This way, the same template can be used in any program (not just interactive
ones). If an indicator is not referenced in either the display file or the
O-specs (or printer file), it is removed from the data structure and is made
a stand-alone (named) indicator field (RPG Toolbox converts most resulting
and conditioning indicators to BIFs).

Francis Lapeyre
IS Dept. Programmer/Analyst
Stewart Enterprises, Inc.
E-mail: flapeyre@xxxxxxxx 



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Weber, Richard
Sent: Friday, January 13, 2006 10:17 AM
To: 'rpg400-l@xxxxxxxxxxxx'
Subject: RE: Indicator Coding Technique

Thank you all for responding.  You didn't let me down!

Sitting on my desk as I type is a copy of Jon Paris' handout, "Essential
Skills for the RPG Developer" page 7 and 8, "Indicatorless RPG Examples".  I
have used this technique very successfully and like it.  So I especially
appreciate your response, Jon.

Now for my opinion on the technique I described:  If you haven't already
guessed, I hate it.  I agree with all the reasons given.  Many were the same
points I made.  I agree that we should strive to make our code as readable
as possible.  The argument that I am up against is: "If this is our standard
and we teach it to all our staff and consultants, then everyone will
understand it and it won't matter".  Personally, I want my code to be read
by any programmer walking in the door, without having to teach him our
"technique".

Anyway, thank you all for your opinions.  Hopefully, I will be able to use
them to reinforce my own arguments against this "standard".  At least I can
tell them that message board was unanimously against it! 

Regards.

Rick Weber  |  TOYS 'Я' US International 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.