Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

indicator

Status
Not open for further replies.

thelearner

Programmer
Jan 10, 2004
153
US
Hi,

How do I turn off (or on) consecutive indicators in one line of code. For example I want to turn off *in60 *in61 and *in62. I don't want to do
*in60 = '0';
*in61 = '0';
etc..

Thanks in advance.
 
Can't do it in free form. What are you using the indicators for?

RedMage1967
IBM Certifed - RPG IV Progammer
 
Depending on what you are trying to do, maybe this would work
Code:
*
D Ptr            S            *  INZ(%ADDR(*IN))
D IndStructure   DS              BASED(Ptr)
D  Exit                          OVERLAY(IndStructure:3)
D                                LIKE(*IN)  
D  FieldErrors              9    OVERLAY(IndStructure:41)
D  SFL_Dsp_Ctl              4    OVERLAY(IndStructure:70)
then you can change them in one line. I my example I can reset a group of error indicators or set the indicators to display a subfile all in one go:
Code:
FieldErrors = *ALL'0'
SFL_Dsp_Ctl = '1100'

-or-

Eval     FieldErrors = *ALL'0'
Eval     SFL_Dsp_Ctl = '1100'
Again, sorry RedMage, I still haven't had time to look into free form RPG.

PeteJ
(Contract Code-monkey)

It's amazing how many ways there are to skin a cat
(apologies to the veggies)
 
try: movea'000' *in,60

in this instance, you have 3 indicators being turned off, starting with #60.

If you want to turn them on, it would be '111'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top