Copying selective records from VSAM to VSAM
Posted: Mon Nov 18, 2013 5:56 pm
Hi,
My shop is using FLASHCPY to take snap of entire VSAM file.
Now, My requirement is to perform a step that will copy selective records ( say from logical record# 10 to 100 or first 1000 logical records) from a VSAM file to another VSAM file. Is It possible using FLASHCPY. I am providing below code to show how our shop currently using FLASHCPY to snap entire VSAM file to another
&HLQ..&SYSUID..XMIT.VSAM2 is the target VSAM and &FRMNAME2 is the input VSAM.
I am wondering if there is any parameter where I can specify no.of records or (startrec and endrec values) to copy only few records. Please help
My shop is using FLASHCPY to take snap of entire VSAM file.
Now, My requirement is to perform a step that will copy selective records ( say from logical record# 10 to 100 or first 1000 logical records) from a VSAM file to another VSAM file. Is It possible using FLASHCPY. I am providing below code to show how our shop currently using FLASHCPY to snap entire VSAM file to another
//STEP2V2 EXEC FLASHCPY
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY DATASET( -
INCLUDE(&FRMNAME2)) -
RENAMEU((&FRMNAME2, -
&HLQ..&SYSUID..XMIT.VSAM2)) -
ALLDATA(*) -
ALLEXCP -
SPHERE -
STORCLAS(SCSHIJ) -
TGTALLOC(SRC) -
VOLCOUNT(ANY) -
TOL(ENQF) -
REPLACEU -
CANCELERROR
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY DATASET( -
INCLUDE(&FRMNAME2)) -
RENAMEU((&FRMNAME2, -
&HLQ..&SYSUID..XMIT.VSAM2)) -
ALLDATA(*) -
ALLEXCP -
SPHERE -
STORCLAS(SCSHIJ) -
TGTALLOC(SRC) -
VOLCOUNT(ANY) -
TOL(ENQF) -
REPLACEU -
CANCELERROR
&HLQ..&SYSUID..XMIT.VSAM2 is the target VSAM and &FRMNAME2 is the input VSAM.
I am wondering if there is any parameter where I can specify no.of records or (startrec and endrec values) to copy only few records. Please help