View previous topic :: View next topic |
Author |
Message |
abhishek_snn Beginner
Joined: 24 Aug 2006 Posts: 16 Topics: 5
|
Posted: Thu Aug 31, 2006 11:58 pm Post subject: How to list members of PDS? |
|
|
I want to list the members of a PDS in a Dataset.
Can this be done using LMMLIST or is there any other way? I am not supposed to use rexx or clist.
Any idea how this can be achieved? |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Sep 01, 2006 1:11 am Post subject: |
|
|
Yes, the ISPF LMMLIST service will work. So will TSO LISTDS 'pds' MEMBERS. |
|
Back to top |
|
|
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Fri Sep 01, 2006 9:56 am Post subject: |
|
|
And how are you going to invoke LMMLIST?
________
buy scale
Last edited by coolman on Sat Feb 05, 2011 1:52 am; edited 1 time in total |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Sep 01, 2006 11:12 am Post subject: |
|
|
I presumed when there was the disclaimer "no REXX or CLIST" that the LMMLIST Service would be done via another development language. |
|
Back to top |
|
|
anbesivam Beginner
Joined: 09 Aug 2006 Posts: 66 Topics: 14
|
Posted: Sat Sep 02, 2006 9:31 am Post subject: |
|
|
Hi Abishek_ssn,
We can use ISPLINK Services for LMMLIST to retrive member names.
Following is the sample code.
Code: | CALL ISPLINK ('VDEFINE ', '(VAR1)',
VAR1, 'CHAR ' ,STG(VAR1));
CALL ISPLINK ('LMINIT ','VAR1 ',' ',' ',' ',' ',' ',' ',
' ',DDNAME,' ','SHR ');
IF PLIRETV() ^= 0 THEN DO;
PUT SKIP LIST('TSTPDS: LMINIT FAILED FOR VAR1 RC=',PLIRETV());
PUT SKIP LIST('TSTPDS: TERMINATING');
CALL PLIRETC(8);
RETURN;
END;
CALL ISPLINK ('LMOPEN ',VAR1);
IF PLIRETV() ^= 0 THEN DO;
PUT SKIP LIST('TSTPDS: LMOPEN FAILED FOR VAR1 RC=',PLIRETV());
PUT SKIP LIST('TSTPDS: TERMINATING');
CALL PLIRETC(8);
RETURN;
END;
CALL ISPLINK ('VDEFINE ', '(MEMBER)',
MEMBER, 'CHAR ' ,STG(MEMBER));
MEMBER=''; /* FOR FIRST TIME */
CALL ISPLINK ('LMMLIST ',VAR1,'LIST ','MEMBER ','YES ');
IF PLIRETV()^= 0
THEN DO;
PUT SKIP LIST('TSTPDS: LMLIST FAILED FOR VAR1 RC=',PLIRETV());
CALL ISPLINK ('LMMLIST ',VAR1,'FREE ');
END;
ELSE DO;
PUT SKIP LIST('MEMBER NAME:',MEMBER);
END;
CALL ISPLINK ('LMCLOSE ',VAR1);
CALL ISPLINK ('LMFREE ',VAR1); |
Hope this will give some idea for you... |
|
Back to top |
|
|
mrgthiru Beginner
Joined: 16 Jan 2007 Posts: 6 Topics: 2 Location: INDIA
|
Posted: Tue Jan 16, 2007 10:38 am Post subject: |
|
|
Hi Abhisek,
Here is a REXX program try this....
Code: |
/*rexx*/
SAY 'ENTER DATASET NAME'
PARSE UPPER PULL PDSNAME
PDSMSG = SYSDSN("'"PDSNAME"'")
IF PDSMSG <> 'OK' THEN DO
SAY "'"PDS"' MESSAGE:" PDSMSG
RETURN
END
A = OUTTRAP('VAR.')
"LISTDS '"PDSNAME"' MEMBERS"
DO I = 7 TO VAR.0 /* PROCESS ALL MEMBERS OF SOURCE PDS */
MEMBER = VAR.I
SAY MEMBER
END
|
Try this easy & simple...
Thanks & Regards
Gthiru _________________ My blood says B+ |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Jan 16, 2007 10:54 am Post subject: |
|
|
Quote: | I want to list the members of a PDS in a Dataset.
Can this be done using LMMLIST or is there any other way? I am not supposed to use rexx or clist. |
then write the ISPF dialog in COBOL using the functions provided in the REXX examples above.
or
you can use the 3.4 panel and enter either B,V, or E as a line command for the ds
or are you looking for a batch job solution: JCL? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
blitz Beginner
Joined: 24 Dec 2002 Posts: 28 Topics: 4
|
Posted: Wed Jan 17, 2007 9:19 am Post subject: |
|
|
Code: |
//JS10 EXEC PGM=IEHLIST
//SYSPRINT DD SYSOUT=*
//DDNAME1 DD UNIT=3390,VOL=SER=SYSRES,DISP=OLD
//SYSIN DD *
LISTPDS DSNAME=SYS1.LINKLIB,FORMAT,VOL=3390=SYSRES
/*
|
Use a IDCAMS LISTCAT if above doesn't work. |
|
Back to top |
|
|
|
|