-
1
- #1
Also, is there a better way of pulling in a gdg family using the base than outtrapping (and stripping out extraneous data) the output from listcat;
such as ;
GETDATA = OUTTRAP("RAWOUT.","*"
"LISTCAT ENTRIES("INDSN"" /* where indsn = base gdg */
STOPGETDATA = OUTTRAP('OFF')
IF WORD(RAWOUT.1,1) <> "GDG" THEN DO
SAY 'NOT GDG BASE'
EXIT
END
GDGLISTINDEX = 0
DO LOOP = 1 TO RAWOUT.0
IF WORD(RAWOUT.LOOP,1) <> "NONVSAM" THEN ITERATE
GDGLISTINDEX = GDGLISTINDEX + 1
GDGLIST.GDGLISTINDEX = WORD(RAWOUT.LOOP,3)
/*SAY GDGLIST.GDGLISTINDEX*/
END
GDGLIST.0=GDGLISTINDEX
/*SAY 'GDGLISTINDEX=' GDGLISTINDEX*/
/*SAY GDGLIST.0*/
such as ;
GETDATA = OUTTRAP("RAWOUT.","*"
"LISTCAT ENTRIES("INDSN"" /* where indsn = base gdg */
STOPGETDATA = OUTTRAP('OFF')
IF WORD(RAWOUT.1,1) <> "GDG" THEN DO
SAY 'NOT GDG BASE'
EXIT
END
GDGLISTINDEX = 0
DO LOOP = 1 TO RAWOUT.0
IF WORD(RAWOUT.LOOP,1) <> "NONVSAM" THEN ITERATE
GDGLISTINDEX = GDGLISTINDEX + 1
GDGLIST.GDGLISTINDEX = WORD(RAWOUT.LOOP,3)
/*SAY GDGLIST.GDGLISTINDEX*/
END
GDGLIST.0=GDGLISTINDEX
/*SAY 'GDGLISTINDEX=' GDGLISTINDEX*/
/*SAY GDGLIST.0*/