Using indicators

45 pts.
Hi All, I have two problems. Please help 1) If in a RPGLE program. We have already used all the general purpose indicators. Then what are the ways so that we can maintain other extra indicators in the program. 2)How can we retreive the RRN number of a PF in a RPGLE program.Is there any keyword.

Answer Wiki

Thanks. We'll let you know when a new response is added.

1) Named Indicators
2) INFDS (file information data structure)


First, get rid of all uses of numbered indicators except perhaps for those used for some display file subfile functions. There are no other reasons to use the numbered general indicators. Alternatives have been available for 15 years or so.

Next, if you need a logical boolean variable, then just create one. You give it a data type of N for a stand-alone field or data structure subfield. Since you can define perhaps tens of thousands of these, it’s unlikely that you will ever “run out”.

Finally, if you’re using RPGLE and you “ran out” of general indicators, your program is far too complicated. Start breaking it up into simpler well defined modules and/or procedures. Why use RPGLE if you’re going to code the same as you did with RPG?


Discuss This Question: 3  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • astradyne
    If your program uses display files or printer files then each display and printer file can have its own set of indicators that are held separately to the standard program indicators. Example source showing the use of INDARA can be found at To hold conditions within a program you can use indicator variables which are simply variables with a data type of "n". Indicator variables can be set to either *ON or *OFF states and used as you would use normal indicators. If you find that you're coding a lot of conditioning indicators within display files to control attributes such as reverse image, colour, position cursor, etc, then in your display file you can assign a "P-Field" to your display field and use it to control the fields attributes. An example of using P-Fields can be found at All the best Jonathan
    370 pointsBadges:
  • WaltZ400
    To question 1, what is the reason you are using *IN01 through *IN99? With all the BIF's within RPGLE there is no reason other than conditioning display and printer files that you need to use these. Use %EQUAL on a SETLL instead of an indicator. Use %FOUND on a CHAIN or %EOF on a read. As the first reply mentioned you can create your own named indicators within your programs (data type N) that can be turned on and off just like a normal indicator to condition code within the program. The only real indicator that is even required in a program is *INLR.
    655 pointsBadges:
  • TomLiotta
    How can we retreive the RRN number of a PF in a RPGLE program. Since this has nothing to do with "Using indicators", it shouldn't be part of this question. One purpose of this site is to hold answers that others can find later when similar problems arise. No one is likely to look in an item titled "Using indicators" if searching for info about PFs and RRNs. Open a second question with a relevant title for details. RRN can be found in the INFDS data structure:
    D DB_RRN                397    400B 0
    125,585 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: