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.
Copy a VSAM to a PDS member?
-
- Registered Member
- Posts: 24
- Joined: Thu Jul 11, 2013 6:28 pm
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Copy a VSAM to a PDS member?
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.
-
- Registered Member
- Posts: 24
- Joined: Thu Jul 11, 2013 6:28 pm
Re: Copy a VSAM to a PDS member?
Thanks.
I have used the above JCL (edit: and control cards).
Edit: coded - please do it yourself in future
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)
/*
Edit: coded - please do it yourself in future
-
- Registered Member
- Posts: 24
- Joined: Thu Jul 11, 2013 6:28 pm
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