View previous topic :: View next topic
|
Author |
Message |
bala_span
New User
Joined: 26 Aug 2006 Posts: 11
|
|
|
|
Hi
I need JCL to Copy/Repro VSAM file to Another VSAM file. I do not have File-aid installed.
If you could provide me a JCL which does this will be helpful.
Thanks
B |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
To copy, you can use IDCAMS/REPRO. If target VSAM does not exist, again use IDCAM DEFINE to define it.
Code: |
//STP0100 EXEC PGM=IDCAMS
//********************************************************************
//****** REPRO VSAM TO VSAM FILE *******
//********************************************************************
//DDI DD DSN=FIRST.VSAM.FILE,
// DISP=SHR
//DDO DD DSN=SECOND.VSAM.FILE,
// DISP=SHR
//SYSIN DD *
REPRO -
INFILE(DDI) -
OUTFILE(DDO)
/*
//SYSOUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABENDAID DD SYSOUT=*
|
|
|
Back to top |
|
|
bala_span
New User
Joined: 26 Aug 2006 Posts: 11
|
|
|
|
MFRASHEED wrote: |
To copy, you can use IDCAMS/REPRO. If target VSAM does not exist, again use IDCAM DEFINE to define it.
Code: |
//STP0100 EXEC PGM=IDCAMS
//********************************************************************
//****** REPRO VSAM TO VSAM FILE *******
//********************************************************************
//DDI DD DSN=FIRST.VSAM.FILE,
// DISP=SHR
//DDO DD DSN=SECOND.VSAM.FILE,
// DISP=SHR
//SYSIN DD *
REPRO -
INFILE(DDI) -
OUTFILE(DDO)
/*
//SYSOUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABENDAID DD SYSOUT=*
|
|
Thanks Rasheed. That was very helpful. |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
Hi,
Is it possible to do a repro on last few records of a file just based on the count. Say copy last 1000 records. I dont know any key or the total number of records in file to position my cursor. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you look into using your sort product. . .
Also, it would be better to start a new topic rather than reply to some 3+ year old topic. |
|
Back to top |
|
|
|