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
 

 

Batch utility to write PDS member list to sequential file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Wallaby Bob

New User


Joined: 03 Feb 2004
Posts: 2
Location: Sydney

PostPosted: Tue Feb 03, 2004 9:34 am    Post subject: Batch utility to write PDS member list to sequential file
Reply with quote

Does anybody know of or have any JCL for a utility that will write a PDS member list to a sequential file?

I did this about 8 years ago but can't remember the tool I used to generate the PDS member list.

Examples of JCL would be greatly apreciated.

icon_question.gif
Back to top
View user's profile Send private message

bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Tue Feb 03, 2004 5:49 pm    Post subject:
Reply with quote

you can use tso in batch with litds or listdsi command
Back to top
View user's profile Send private message
Wallaby Bob

New User


Joined: 03 Feb 2004
Posts: 2
Location: Sydney

PostPosted: Wed Feb 04, 2004 3:39 am    Post subject:
Reply with quote

I recieved the following suggestion;

Wallaby Bob,

The following JCL will give you the desired results.

Code:

//STEP10 EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=YOUR PDS MEM LISTING
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSTSIN DD *
LISTDS 'your pds name' MEMBERS
/*



Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 238
Location: USA

PostPosted: Wed Feb 04, 2004 5:24 pm    Post subject:
Reply with quote

Hello Wallaby Bob,

Please find the below mentioned rexx routine to get the desired results


Code:

SAY 'PLEASE ENTER YOUR PDS NAME YOU WANT TO LIST : '       
SAY 'PLEASE GIVE THE PDS NAME IN QUOTES'                   
PARSE PULL DSN                                             
                                                           
ID = USERID()                                               
NAME = '.PDS.LIST'                                         
OUTNAME = ID || NAME                                       
                                                           
"ALLOC F(OUTPUT) DA('"OUTNAME"') NEW UNIT(SYSDA) DSORG(PS)",
"SPACE(2 1) Tracks LRECL(80) RECFM(F,B)"                   
                                                           
x = OUTTRAP(ListMem.,"*")                                   
"listds " DSN " mem "                                       
x = OUTTRAP("off")                                         
                                                           
MemDis = 'N'                                               
Mcnt = 0                                                   
                                                           
DO Cnt = 7 to ListMem.0                                     
   MCnt = MCnt + 1                                         
   Mem = strip(ListMem.Cnt)                                 
   LOC.Mcnt = Mem                                           
   SAY 'mem ' mem                                           
END                                                         

"EXECIO * DISKW OUTPUT (STEM LOC. FINIS"                   
"FREE FI(OUTPUT)"                                           
                                                           
SAY 'PLEASE CHECK THE PDS CONTENTS IN : ' OUTNAME           




Hope this helps

Regards

Mayuresh Tendulkar
Back to top
View user's profile Send private message
bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Thu Feb 05, 2004 10:19 pm    Post subject:
Reply with quote

IKJEFT01 is TSO in batch program.
so basically use this program to issue the cmd I showed you.

sorry for forgetting the jcl deck.
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
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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