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

Batch utility to write PDS member list to sequential file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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: 237
Location: USA

PostPosted: Wed Feb 04, 2004 5:24 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts Excuting store procedure via JCL batch JCL & VSAM 1
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts how to eliminate null indicator value... DB2 7
Search our Forums:

Back to Top