Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 & VSAM
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    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

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
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: 235
Location: Chennai

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: 2360
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: 195
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: 20
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: 20
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: 20
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: 235
Location: Chennai

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: 40
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: 235
Location: Chennai

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: 4648
Location: Raleigh, 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: 235
Location: Chennai

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: 2360
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: 182
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
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Fri Jun 27, 2008 12:01 pm    Post subject:
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    Post subject:
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: 2360
Location: Israel

PostPosted: Sun Jun 29, 2008 1:28 am    Post subject:
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

Site Director


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

PostPosted: Sun Jun 29, 2008 3:29 am    Post subject:
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: 2360
Location: Israel

PostPosted: Sun Jun 29, 2008 10:48 am    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts Parsing and Listing a Subset of Recor... Charles Wolters IBM Tools 3 Fri Feb 05, 2016 10:39 pm
No new posts JCL to replace string in all PDS members bhamarekm All Other Mainframe Topics 8 Thu May 28, 2015 8:44 pm
No new posts Issue with copying PDS members to ano... Senthilkumar k CLIST & REXX 13 Mon Apr 20, 2015 1:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us