CLIST to extract member names
The following CLIST code will give you the list of members in a PDS.
SET &SYSOUTTRAP = 1000 LISTDS ‘&SYSUID..PDS’ MEMBERS SET NO_OF_OUTPUT= &SYSOUTLINE SET &SYSOUTTRAP = 0 SET CTR =1 SET MEM_COUNT=0 DO UNTIL (&CTR > &NO_OF_OUTPUT) Â IF &CTR>=7 THEN + Â DO Â SET MEMBER = &STR(&&SYSOUTLINE&CTR) Â WRITE MEMEBER NAME IS &STR(&MEMBER) Â SET MEM_COUNT=&MEM_COUNT+1 Â END Â SET CTR = &CTR +1 END
WRITE MEMBER COUNT IS &MEM_COUNT