View previous topic :: View next topic
|
Author |
Message |
bharat_juneja
New User
Joined: 21 Dec 2005 Posts: 20 Location: US
|
|
|
|
I have a PDS say a coblib and I want all its members to be gott down in a PS one after the other?
A sample JCL would be great.
Thanks,
Bharat |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
In a TSO session, you probably use the PRINTDS command. In a program, you probably use ISPF Library Management (LM) services. An approximate alternative for batch is the IEBPTPCH program:
Code: |
//STEPXXXX EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=MY.PDS
//SYSUT2 DD DSN=MY.SEQ,DISP=(,CATLG,DELETE),...
//SYSIN DD *
PUNCH TYPORG=PO
/*
|
as documented here. |
|
Back to top |
|
|
bharat_juneja
New User
Joined: 21 Dec 2005 Posts: 20 Location: US
|
|
|
|
Thanks, it worked.
The only problem I am facing is, every line is prefixed by a 'V'
and empty lines by V2 :
V//D005C001 JOB (D045,11-160),'PO-850',MSGCLASS=7,CLASS=9,PRTY=8
V2
V//*
V2
V/*JOBPARM PROCLIB=D
Any suggestion?
Thanks again,
Bharat |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Remove them with a SORT step?
Anyway, that's one reason why I'd rather use TSO PRINTDS:
Code: |
//STEP0001 EXEC PGM=IKJEFT01
//PDS DD DISP=SHR,DSN=MY.PDS
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PRINTDS FILE(PDS) ALL TITLE TODATASET(MY.PDS.SEQ)
/*
|
|
|
Back to top |
|
|
bharat_juneja
New User
Joined: 21 Dec 2005 Posts: 20 Location: US
|
|
|
|
Ok, that will be good.
I was wondering if I have to set some parameters
Thanks a lot,
Bharat |
|
Back to top |
|
|
pspreddy
New User
Joined: 14 Mar 2006 Posts: 24 Location: Chicago
|
|
|
|
Also we can copy only the selected members of the PDS with an option as below
//SYSIN DD *
PUNCH TYPORG=PO,MAXNAME=N
MEMBER NAME=member1
MEMBER NAME=member2
...............
...............
MEMBER NAME=memberN
/*
where N in MAXNAME=N is the number of members you sepcify for copy
Thanks
Sivaprasad |
|
Back to top |
|
|
Shamsudeen
New User
Joined: 16 Jan 2006 Posts: 4
|
|
|
|
Guys. Could you please let me know instead of copying the entire member to the PS, how can I copy all the member names alone to PS |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Use the TSO command "TSO LISTDS 'PDS.NAME' MEMBERS".
The above methods would also work, with some editing of the output of course. |
|
Back to top |
|
|
|