Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Listing all members with pattern *DCP* in PDS?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 131
Location: trichy

PostPosted: Tue Jun 24, 2008 10:12 am    Post subject: Listing all members with pattern *DCP* in PDS?
Reply with quote

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
View user's profile Send private message
References
PostPosted: Tue Jun 24, 2008 10:12 am    Post subject: Re: Listing all members with pattern *DCP* in PDS? Reply with quote

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 1862
Location: Israel

PostPosted: Tue Jun 24, 2008 10:35 am    Post subject:
Reply with quote

You can use the ISPF service LMMLIST.

O.
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 131
Location: trichy

PostPosted: Tue Jun 24, 2008 10:40 am    Post subject: Reply to: Listing all members with pattern *DCP* in PDS?
Reply with quote

Hi ofer71,

Can u explain how to use that LMMLIST? And also whether it is shop specific....


Regards
R KARTHIK
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 1862
Location: Israel

PostPosted: Tue Jun 24, 2008 12:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 176
Location: India

PostPosted: Tue Jun 24, 2008 12:59 pm    Post subject: Reply to: Listing all members with pattern *DCP* in PDS?
Reply with quote

try this link

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ispzdg60/D.0
Back to top
View user's profile Send private message
tangentray

New User


Joined: 30 Dec 2006
Posts: 18
Location: Kolkata, India

PostPosted: Tue Jun 24, 2008 3:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
tangentray

New User


Joined: 30 Dec 2006
Posts: 18
Location: Kolkata, India

PostPosted: Tue Jun 24, 2008 3:23 pm    Post subject:
Reply with quote

Ignore the above, just wanted to underline ... did not work though icon_cry.gif
Back to top
View user's profile Send private message
tangentray

New User


Joined: 30 Dec 2006
Posts: 18
Location: Kolkata, India

PostPosted: Tue Jun 24, 2008 3:25 pm    Post subject:
Reply with quote

Man this is irritating!! please ignore "[. u. ]...... [.\.u]" hope this prints icon_evil.gif
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 131
Location: trichy

PostPosted: Tue Jun 24, 2008 4:49 pm    Post subject: Reply to: Listing all members with pattern *DCP* in PDS?
Reply with quote

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
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 24
Location: bangalore

PostPosted: Tue Jun 24, 2008 5:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 131
Location: trichy

PostPosted: Tue Jun 24, 2008 6:34 pm    Post subject: Reply to: Listing all members with pattern *DCP* in PDS?
Reply with quote

HI ssk1711,

Thnks for sharing POS command in REXX.

Regards
R KARTHIK
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3067
Location: Charlotte,NC USA

PostPosted: Tue Jun 24, 2008 6:40 pm    Post subject: Reply to: Listing all members with pattern *DCP* in PDS?
Reply with quote

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 131
Location: trichy

PostPosted: Wed Jun 25, 2008 2:05 pm    Post subject: Reply to: Listing all members with pattern *DCP* in PDS?
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 1862
Location: Israel

PostPosted: Wed Jun 25, 2008 2:14 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 161
Location: hyderabad

PostPosted: Wed Jun 25, 2008 8:37 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2