Page 1 of 1
Copy a VSAM to a PDS member?
Posted: Wed Mar 16, 2016 1:51 pm
by Ramesh_Mainframe
Hi,
Can we copy a VSAM file to a PDS member on mainframes?
I have a VSAM file, My.VSAM.file. And want to copy it to a PDS, named My.PDS in a new member. Can this be done, please guide.
Thanks in advance.
Re: Copy a VSAM to a PDS member?
Posted: Wed Mar 16, 2016 5:34 pm
by Robert Sample
As long as the PDS attributes are compatible (RECFM and LRECL in particular), you can REPRO the data from the VSAM data set to a PDS member. Just have a DD statement in your IDCAMS pointing to the PDS and member, then use OUTDD in IDCAMS. The PDS member is just like a sequential data set at that point.
Re: Copy a VSAM to a PDS member?
Posted: Wed Mar 23, 2016 7:43 am
by Ramesh_Mainframe
Thanks.
Code: Select all
//*
// EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//VSAM DD DSN=VSAM.DATASET,DISP=OLD
//PDSB DD DSN=PDS.SEQ.BACKUP(VSAMBKUP),UNIT=SYSDA,
// DISP=SHR
//SYSIN DD *
REPRO -
INFILE(VSAM) -
OUTFILE(PDSB)
/*
I have used the above JCL
(edit: and control cards).
Edit: coded - please do it yourself in future
Re: Copy a VSAM to a PDS member?
Posted: Fri Mar 25, 2016 1:36 pm
by Ramesh_Mainframe
Will take care about it in future.