IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Listing all members with pattern *DCP* in PDS?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Tue Jun 24, 2008 10:12 am
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
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Jun 24, 2008 10:35 am
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: 235
Location: Chennai

PostPosted: Tue Jun 24, 2008 10:40 am
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: 2358
Location: Israel

PostPosted: Tue Jun 24, 2008 12:53 pm
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: 194
Location: India

PostPosted: Tue Jun 24, 2008 12:59 pm
Reply with quote

try this link

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: 20
Location: Kolkata, India

PostPosted: Tue Jun 24, 2008 3:21 pm
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: 20
Location: Kolkata, India

PostPosted: Tue Jun 24, 2008 3:23 pm
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: 20
Location: Kolkata, India

PostPosted: Tue Jun 24, 2008 3:25 pm
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: 235
Location: Chennai

PostPosted: Tue Jun 24, 2008 4:49 pm
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: 40
Location: bangalore

PostPosted: Tue Jun 24, 2008 5:35 pm
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: 235
Location: Chennai

PostPosted: Tue Jun 24, 2008 6:34 pm
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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jun 24, 2008 6:40 pm
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: 235
Location: Chennai

PostPosted: Wed Jun 25, 2008 2:05 pm
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: 2358
Location: Israel

PostPosted: Wed Jun 25, 2008 2:14 pm
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: 183
Location: hyderabad

PostPosted: Wed Jun 25, 2008 8:37 pm
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
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Jun 27, 2008 12:01 pm
Reply with quote

@sril.krishy & karthikr44 :

Using Syncsort, Pgm must be SYNCTOOL
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jun 28, 2008 6:20 pm
Reply with quote

Hi,

Sounds like a one shot deal, so you might try this and then edit OUTDD to show only the member names:
Code:
//SEARCH  EXEC PGM=ISRSUPC,
//            PARM=(SRCHCMP,'ANYC')
//NEWDD  DD DSN=yrDSN,
//          DISP=SHR
//OUTDD  DD DSN=yrDSN,
//          DISP=OLD (can be NEW)
//SYSIN  DD *
SRCHFOR  '*DCP*'
//

You can search for multi strings:
Code:
SRCHFOR  '*DCP*',
SRCHFOR  '*ABC*',
.
.
.
SRCHFOR  '*XYZ*'
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jun 29, 2008 1:28 am
Reply with quote

mmwife -

The SRCHFOR statement will look for the string within the members. I believe the O/P wanted to filter the member names.

In addition, the fine manual says nothing about a pattern characters for the SRCHFOR value.

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jun 29, 2008 3:29 am
Reply with quote

Hello,

Quote:
In addition, the fine manual says nothing about a pattern characters for the SRCHFOR value
The value specified (without the asterisks) is used as a "pattern" and the entire record is searched for the pattern/value.

Quote:
I believe the O/P wanted to filter the member names
Mee too icon_smile.gif
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jun 29, 2008 10:48 am
Reply with quote

Dick -

Quote:
The value specified (without the asterisks) is used as a "pattern" and the entire record is searched for the pattern/value.
I double-checked myself now. There is no "pattern" search in SUPERC.

When you specify SRCHFOR *DCP*, SUPERC will look for the string "*DCP*".

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jun 29, 2008 1:50 pm
Reply with quote

Hi O,

Quote:
I double-checked myself now. There is no "pattern" search in SUPERC.

When you specify SRCHFOR *DCP*, SUPERC will look for the string "*DCP*".
Yup, we're both saying the same thing . . . icon_smile.gif

If the "*DCP*" is changed to "DCP" the search returns everything that matches - kinda like a "pattern". It is just not called a pattern icon_wink.gif

d
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Sun Jun 29, 2008 11:27 pm
Reply with quote

Quote:

Using Syncsort, Pgm must be SYNCTOOL


UmeySan,
SYNCSORT is provided the Synonym option.So,SYNCSORT will be automatically invoked when we code ICETOOL as PGM.

Thanks
Krishy
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Jul 01, 2008 7:12 am
Reply with quote

Oops! I misread the OP.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Rexx pattern matching on PS qualifer ... CLIST & REXX 1
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts REXX editmacro to compare two members... CLIST & REXX 7
No new posts Easy way to delete selected members f... IBM Tools 12
Search our Forums:

Back to Top