I have a piece of snipet that list the catalog information of a GDG generation file. The code works fine if i give the GDG file inside the code. But, if i fetch the GDG file names from a different dataset through EXECIO command it fails with RC 12. Can anYbodY help me in understanding the reason. Please find the codes below:
X=OUTTRAP('LST.')
"LISTC ENT('"REWIEW.GDG.G0201V00 "') ALL"
X=OUTTRAP=('OFF')
"LISTC ENT('"REWIEW.GDG.G0201V00 "') ALL"
X=OUTTRAP=('OFF')
/* REXX */
TRACE ?R
"ALLOC F(INDD) DS('"REVIEW.DATASET.REPORT"') SHR REUSE"
"EXECIO * DISKR INDD(STEM NEW."
DO I=1 TO NEW.0
X=OUTTRAP('LST.',4)
"LISTC ENT('"NEW.I"') ALL"
X=OUTTRAP=('OFF')
TRACE ?R
"ALLOC F(INDD) DS('"REVIEW.DATASET.REPORT"') SHR REUSE"
"EXECIO * DISKR INDD(STEM NEW."
DO I=1 TO NEW.0
X=OUTTRAP('LST.',4)
"LISTC ENT('"NEW.I"') ALL"
X=OUTTRAP=('OFF')
Regards,
Viswa