I have a Batch Edit in File Manager for IMS that I want to use a REXX proc.
Everything seemed to be going OK until I tried to read in a flat file one line at a time using EXECIO 1. That gets a return code of 2 at end of file and that's what all of the examples in the REXX manual use to check for EOF.
HOWEVER, when I use this in the IEB proc, the whole thing bails out when the RC of 2 occurs:
8 *-* DO UNTIL RC=2
9 *-* ADDRESS MVS "EXECIO 1 DISKR FILEIN "
>>> "EXECIO 1 DISKR FILEIN "
+++ RC(2) +++
36 *-* exbad:
*-* EXIT "BAD" RC
0FMNBB382 REXX exec terminated with RC 2
0FMNIB426 Function terminated
That line 36 is NOT mine. It seems to be coming from something between my code and the system.
Is there some other way to find the EOF with using the EXECIO *? Or maybe a way to trap that bad RC before the hidden layer kicks in?