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

How to copy the contents of a PDS to PS File


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

New User


Joined: 25 Sep 2008
Posts: 66
Location: Bengaluruuuuuu

PostPosted: Wed Jul 15, 2009 8:20 pm
Reply with quote

This was the original question:


Could any one let me know how to copy the contents of all the members inside the PDS(without listing out the members inside the PDS in the job) to a flat file.


My intention was just to help the person who has asked the original question incase he has still not found the solution to this.
Back to top
View user's profile Send private message
rahulbank

New User


Joined: 25 Sep 2008
Posts: 66
Location: Bengaluruuuuuu

PostPosted: Wed Jul 15, 2009 8:22 pm
Reply with quote

Sorry Now I realize the oringinal question was asked way back in time...

Apologies....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 15, 2009 8:26 pm
Reply with quote

edit the pds member, enter 'A' at the line after which you want the new data positioned and enter COPY on the commandline. Depress ENTER.
fill out the panel.
Back to top
View user's profile Send private message
Sagar_mainframe

New User


Joined: 07 Jun 2008
Posts: 34
Location: Harrisburg, Pennsylvania

PostPosted: Wed Jul 15, 2009 8:54 pm
Reply with quote

Actually I tried using IDCAMS as follows:

Code:
//PS010    EXEC  PGM=IDCAMS                           
//SYSOUT   DD SYSOUT=*                               
//SYSPRINT DD SYSOUT=*                               
//SYSUDUMP DD SYSOUT=*                               
//INFILE   DD DSN=PRGSD1.PCDATF.ADHERIS.TEMP,DISP=SHR
//OUTFILE  DD DSN=PRGSD1.CTL.LIB(PCAD004Z),           
//            DISP=(NEW,CATLG,DELETE),               
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000),   
//            UNIT=CARDA,                             
//            SPACE=(CYL,(500,500),RLSE)             


but it says 'PRGSD1.CTL.LIB' already exists.

I want tp copy the contents of flat file into the member PCAD004Z,
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 15, 2009 8:56 pm
Reply with quote

Use DISP=OLD for guaranteed results, or DISP=SHR if you're sure nobody else can be updating the PDS at the same time. DISP applies to the data set, not to the member -- as many have discovered the hard way by attempting to code DISP=(OLD,DELETE) to get rid of a member (the data set goes away instead).
Back to top
View user's profile Send private message
Sagar_mainframe

New User


Joined: 07 Jun 2008
Posts: 34
Location: Harrisburg, Pennsylvania

PostPosted: Wed Jul 15, 2009 9:25 pm
Reply with quote

Thanks a lot to all of you!!!! icon_biggrin.gif

It's working with DISP=OLD, Just being more specific,you have to give the same length of the PDS (as well as PDS member) as that of the flat file. icon_biggrin.gif
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top