RPG – Avoiding the use of indicators

Indicators are often needed for conditioning field attributes in display files.  The use of these indicators in the RPG program can be avoided by using the following technique…

DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++
d Indicator       s               *   inz(%ADDR(*IN))
d Indstruct       ds                  based(Indicator)
d  scr_err01             71     71
d  scr_err02             72     72 
d  scr_err03             73     73 
d  scr_err04             74     74 
d  sfldsp                80     80 
d  sfldspctl             81     81
d  sflclr                82     82
d  sflnxtchg             83     83

d  sflerror              84     84
d  protect               90     90
d  MsgSflEnd             91     91