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
 

 

How to copy all members of PDS into PS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to copy all members of PDS into PS
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

Moderator Team Head


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

PostPosted: Tue Mar 21, 2006 2:37 am    Post subject: Re: How to copy all members of PDS into PS
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    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Mar 21, 2006 3:37 am    Post subject: Re: How to copy all members of PDS into PS
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    Post subject:
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    Post subject: Re: How to copy all members of PDS into PS
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    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Mar 22, 2006 4:54 pm    Post subject: Re: How to copy all members of PDS into PS
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    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
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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