65 pts.
 Indicator Off with RPG
How can we put all indicator off in single statement or in rpg code (It might be RPGIII Or IV)

Software/Hardware used:
ASKED: October 5, 2011  7:14 AM
UPDATED: March 31, 2012  12:38 AM

Answer Wiki:
I think you just have to initialize the indicator array something like this C MOVEA '0' *IN,x - SINGLE INDICATOR or C MOVEA *zeros *IN - ALL INDICATORS
Last Wiki Answer Submitted:  October 5, 2011  6:36 pm  by  ToddN2000   3,910 pts.
All Answer Wiki Contributors:  ToddN2000   3,910 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

It might or might not be done depending on the definition of “indicator”.

There are three general groups that indicators might be put into. I’ll call the first two groups general and specific. The general group contains the numbered indicators from 01 through 99. The specific group would contain LR, OF, L0, U1 and various others that have names that are related to their purposes. Those two groups exist in both RPG III and IV.

The third group might be called the named indicators. These are only in RPG IV. They are defined as fields having a data type of N.

Of those three types, the general indicators would be affected by the MOVEA instruction over the *IN fields . The specific indicators must be set on or off individually. (Some restrictions apply.)

For the “named” group, it’s possible to define them in in a DS and set them all on or off in a single operation.

So, if “indicator” is defined to mean only the numbered indicators 01 through 99, then MOVEA can satisfy the question. But if all indicators are to be included, I don’t know of any programmed operation that can set them all on or off, not in RPG III nor IV.

Tom

 108,055 pts.

 

…by the MOVEA instruction over the *IN fields .

That should have referred to the “*IN array”. Even the ‘specific’ indicators can be referenced as *INxx “fields”.

Tom

 108,055 pts.