MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printing selective members of a PDS.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Ram
Beginner


Joined: 12 Jan 2004
Posts: 53
Topics: 12

PostPosted: Wed Jun 22, 2005 10:25 am    Post subject: Printing selective members of a PDS. Reply with quote

Hi

My requirement is to print member names of a PDS based on some criteria. E.g My sample PDS has 4 members.
SAMPLE1
SAMPLE2
SAMPLE3
COBTST

I want to print only those member names whose name contains 'SAM'.
So my output dataset should contain :
SAMPLE1
SAMPLE2
SAMPLE3

Thanks,
Ram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Wed Jun 22, 2005 10:52 am    Post subject: Reply with quote

Ram,

If your shop has file-aid then you can use the following JCL to achieve the desired results.

Code:

//STEP0100 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*                     
//SYSLIST  DD SYSOUT=*                     
//DD01     DD DSN=YOUR PDS,
//            DISP=SHR
//DD01O    DD SYSOUT=*                     
//SYSIN    DD *                           
$$DD01 COPY MEMBERS=SAMPLE*                   
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ram
Beginner


Joined: 12 Jan 2004
Posts: 53
Topics: 12

PostPosted: Thu Jun 23, 2005 10:23 am    Post subject: Reply with quote

Kolusu,

Thank you for the prompt reply.I ran the jcl provided by you I did not get what I had expected. I think I was not able to state the problem clearly. I have a PDS that contains around 10,000 JCL's. We follow a naming convention to identify to which module or system a particular jcl belongs. My requirement is to get only the JCL name (the content is not required) belonging to a particular system. Lets assume for system ABC I named my jobs as JBAB****, where the next four characters can be anything. I want a job that can list the Jcls (only name) belonging to ABC system. I tried using a combination of IEBPPTCH and sort utility. I was successfull. But the job was taking a long time to run and it was dumPng the directory contents to the intermediate dataset :x Can you please suggest me an optimal solution ? I am pasting my JCL code below. Its crude but it works :lol:

Code:

//STEP01  EXEC PGM=IEBPTPCH                                           
//SYSPRINT  DD SYSOUT=*                                               
//SYSOUT    DD SYSOUT=*                                               
//SYSUT1    DD DSN=MY PDS,DISP=SHR,                         
//             DCB=(RECFM=U,BLKSIZE=256)                               
//SYSUT2    DD DSN=TEST.IN,DISP=(NEW,PASS),RECFM=FB,LRECL=30, 
//             SPACE=(TRK,(10,10)),UNIT=VIO                           
//SYSIN     DD *                                                       
  PRINT TYPORG=PO                                                     
  LABELS DATA=NO                                                       
/*                                                                     
//STEP02  EXEC PGM=SORT                                               
//SYSOUT    DD SYSOUT=*                                               
//SORTIN    DD DSN=TEST.IN,DISP=SHR                           
//SORTOUT   DD DSN=TEST.OUT,DISP=(NEW,CATLG),LRECL=10,RECFM=FB,
//             SPACE=(10,(10,10)),AVGREC=K                             
//SYSIN     DD  *                                                     
  SORT FIELDS=COPY
  INCLUDE COND=(15,4,CH,EQ,C'JBAB')
  OUTREC FIELDS=(15,8)
/*
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Jun 23, 2005 11:08 am    Post subject: Reply with quote

You could try LISTDS 'MY.PDS' MEMBERS and run the SORT/INCLUDE against the output.
Back to top
View user's profile Send private message
Ram
Beginner


Joined: 12 Jan 2004
Posts: 53
Topics: 12

PostPosted: Thu Jun 23, 2005 11:18 am    Post subject: Reply with quote

Bithead,

Thanks a ton. I have tried your idea and have used SORT to trim the output. Its working Very Happy

Ram
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group