|
|
| Author |
Message |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 131 Location: trichy
|
|
|
|
Hi,
I have a PDS consisting of 300 members. My job is list all member names with pattern *DCP* . Is there any utility to achieve this at single run?
Regards
R KARTHIK |
|
| Back to top |
|
 |
References
|
Posted: Tue Jun 24, 2008 10:12 am Post subject: Re: Listing all members with pattern *DCP* in PDS? |
 |
|
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1862 Location: Israel
|
|
|
|
You can use the ISPF service LMMLIST.
O. |
|
| Back to top |
|
 |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 131 Location: trichy
|
|
|
|
Hi ofer71,
Can u explain how to use that LMMLIST? And also whether it is shop specific....
Regards
R KARTHIK |
|
| Back to top |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1862 Location: Israel
|
|
|
|
LMMLIST is an ISPF service, and like the other services it comes with ISPF. You can find a lot of examples and explanations in the fine manual and in Google.
O. |
|
| Back to top |
|
 |
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 176 Location: India
|
|
| Back to top |
|
 |
tangentray
New User
Joined: 30 Dec 2006 Posts: 18 Location: Kolkata, India
|
|
|
|
How about:
| Code: |
M MY.FAVOURITE.PDS(*dcp*)
|
If you want to save the list in a flat file. Key in "SAVE LIST" on the command line and the list will be saved in <uid>.LIST.MEMBERS. |
|
| Back to top |
|
 |
tangentray
New User
Joined: 30 Dec 2006 Posts: 18 Location: Kolkata, India
|
|
|
|
Ignore the above, just wanted to underline ... did not work though  |
|
| Back to top |
|
 |
tangentray
New User
Joined: 30 Dec 2006 Posts: 18 Location: Kolkata, India
|
|
|
|
Man this is irritating!! please ignore "[. u. ]...... [.\.u]" hope this prints  |
|
| Back to top |
|
 |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 131 Location: trichy
|
|
|
|
Hi all,
I tried following REXX code and it is working
THEPDS = 'DEV2.TEST.JCL'
X = OUTTRAP('L.')
"LISTDS '"THEPDS"' MEMBERS"
X = OUTTRAP('OFF')
I=0
DO LOOP = 7 TO L.0
OLDMEM = STRIP(L.LOOP)
MEM1 = INDEX(OLDMEM,'DCP')
MEM2 = INDEX(OLDMEM,'ECP')
IF MEM1 > 0 | MEM2 > 0 THEN
DO
I=I+1
MEM.0 = I
MEM.I = OLDMEM
END
END
"ALLOC FI(DDOUT) DA(WORK.TEXT) SHR"
"EXECIO * DISKW DDOUT (STEM MEM. FINIS "
"FREE FI(DDOUT)"
"ISPEXEC VIEW DATASET(WORK.TEXT)"
But tangentray simplifies the work...Thanks man....
Thanks for HappySrinu, ofer71 for notfying about LMMLIST, LISTDS... |
|
| Back to top |
|
 |
ssk1711
New User
Joined: 16 Jun 2008 Posts: 24 Location: bangalore
|
|
|
|
Hi
try the below...
***************************************************
DSNAME = "****.*****"
CALL OUTTRAP "MBRS1."
"LISTD" DSNAME "MEMBERS"
CALL OUTTRAP "OFF"
DO I=7 TO MBRS1.0
IF POS('DCB',MBRS1.I) <> 0 THEN
SAY MBRS1.I /*will give the required result*/
END
****************************************************** |
|
| Back to top |
|
 |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 131 Location: trichy
|
|
|
|
HI ssk1711,
Thnks for sharing POS command in REXX.
Regards
R KARTHIK |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3067 Location: Charlotte,NC USA
|
|
|
|
I was under the impression that this request was for a batch solution. Anyway, this is what I came up with:
| Code: |
//STEPX EXEC PGM=IKJEFT01,PARM='LISTDS ''THE.PDS'' MEMBERS'
//SYSTSPRT DD DSN=&&SYSTSPRT,DISP=(,PASS),UNIT=VIO
//SYSTSIN DD DUMMY
//*
//STEPY EXEC PGM=ICETOOL
//IN DD DSN=&&SYSTSPRT,DISP=(OLD,DELETE)
//T1 DD UNIT=VIO,RECFM=FB
//OUT DD DSN=OUTPUT.LIST,DISP=(,CATLG,DELETE),....
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COPY FROM(T1) USING(CTL2)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,CONVERT,STARTREC=7,INCLUDE=(5,3,CH,EQ,C' '),
BUILD=(8,8,80:X)
/*
//CTL2CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(1,8,SS,EQ,C'DCP')
/*
|
|
|
| Back to top |
|
 |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 131 Location: trichy
|
|
|
|
Hi SUPERK,
Since i have SYSNSORT in my shop, ur code doesnt work out for me.
But thanks for sharing IKJEFT01 PGM.
Regards
R KARTHIK |
|
| Back to top |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1862 Location: Israel
|
|
|
|
Here is the LMMLIST solution (of course, you can run it in batch):
| Code: |
/* REXX */
ADDRESS ISPEXEC "LMINIT DATAID(EZTID) DATASET('your_pds')"
ADDRESS ISPEXEC "LMOPEN DATAID(&EZTID)"
DO FOREVER
ADDRESS ISPEXEC "LMMLIST DATAID(&EZTID) OPTION(LIST) MEMBER(MEMNAME)",
"PATTERN(DCP*)"
IF RC = 8 THEN LEAVE
SAY MEMNAME
END
ADDRESS ISPEXEC "LMCLOSE DATAID(&EZTID)"
ADDRESS ISPEXEC "LMFREE DATAID(&EZTID)"
EXIT
|
O. |
|
| Back to top |
|
 |
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 161 Location: hyderabad
|
|
|
|
| Quote: |
Since i have SYSNSORT in my shop, ur code doesnt work out for me.
|
karthikr44,
The above code given by superk will work for SYNCSORT as well.Run and check the above code.
Thanks
Krishy |
|
| Back to top |
|
 |
|
|