I have this working now. Needed to define the indicator variables in RPG thus:| D ISET# ~ S ~ 3I 0 Inz |
and then pair them with the potential nulls in the FETCH statement: FETCH INTO :SET#:ISET#, etc. Values of the indicator variables are -1 when the fetched value is null.
Thanks again to Ludith for putting me on track.