CLIST to extract member names

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