In the display file, using SDA, condition the fields with the indicators – you can do this by typing a * in front of the field and pressing enter, then select “display attributes”, you can condition the field completely by giving an indicator for “field conditioning”, or you can specify individual field attributes for example “non display”, by keying a Y and giving it an indicator.
In your RPG program simply set the indicator on or off just before you display your display file record.
Here are some code examples.
In this example the field FLD1 is visible when indicator 74 is *off –
the ‘N’ is not, as in Not Indicator 74.
A N74 FLD1 4 0B 7 46
Here it would be shown when Indicator 74 is on
A 74 FLD2 4 0B 7 46
FLD3 is always shown but it is protected if
inicators 65 or 32 or 33 or 34 are on.
A FLD3 9Y 0B 8 34EDTCDE(K)
AO 34 DSPATR(PR)
Things are different for subfile fields