The following is an example of declaring indicator variables in ILE RPG.
Given the statement:
C/EXEC SQL FETCH CLS_CURSOR INTO :CLSCD, C+ :DAY :DAYIND, C+ :BGN :BGNIND, C+ :END :ENDIND C/END-EXEC
variables can be declared as follows:
D CLSCD S 7 D DAY S 2B 0 D DAYIND S 2B 0 D BGN S 8A D BGNIND S 2B 0 D END S 8 D ENDIND S 2B 0