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

How to copy all members of PDS into PS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bharat_juneja

New User


Joined: 21 Dec 2005
Posts: 20
Location: US

PostPosted: Tue Mar 21, 2006 2:27 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Mar 21, 2006 2:37 am
Reply with quote

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
View user's profile Send private message
bharat_juneja

New User


Joined: 21 Dec 2005
Posts: 20
Location: US

PostPosted: Tue Mar 21, 2006 3:26 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Mar 21, 2006 3:37 am
Reply with quote

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
View user's profile Send private message
bharat_juneja

New User


Joined: 21 Dec 2005
Posts: 20
Location: US

PostPosted: Tue Mar 21, 2006 3:46 am
Reply with quote

Ok, that will be good.
I was wondering if I have to set some parameters icon_rolleyes.gif

Thanks a lot,
Bharat
Back to top
View user's profile Send private message
pspreddy

New User


Joined: 14 Mar 2006
Posts: 24
Location: Chicago

PostPosted: Tue Mar 21, 2006 6:04 am
Reply with quote

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
View user's profile Send private message
Shamsudeen

New User


Joined: 16 Jan 2006
Posts: 4

PostPosted: Wed Mar 22, 2006 9:16 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Mar 22, 2006 4:54 pm
Reply with quote

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
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 VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top