Copy a VSAM to a PDS member?

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Post Reply
Ramesh_Mainframe
Registered Member
Posts: 24
Joined: Thu Jul 11, 2013 6:28 pm
India

Copy a VSAM to a PDS member?

Post 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.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Copy a VSAM to a PDS member?

Post 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.
Ramesh_Mainframe
Registered Member
Posts: 24
Joined: Thu Jul 11, 2013 6:28 pm
India

Re: Copy a VSAM to a PDS member?

Post 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
Ramesh_Mainframe
Registered Member
Posts: 24
Joined: Thu Jul 11, 2013 6:28 pm
India

Re: Copy a VSAM to a PDS member?

Post by Ramesh_Mainframe »

Will take care about it in future.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”