IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need JCL to Copy/Repro VSAM file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bala_span

New User


Joined: 26 Aug 2006
Posts: 11

PostPosted: Fri Dec 01, 2006 3:14 am
Reply with quote

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
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Fri Dec 01, 2006 3:25 am
Reply with quote

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
View user's profile Send private message
bala_span

New User


Joined: 26 Aug 2006
Posts: 11

PostPosted: Fri Dec 01, 2006 3:47 am
Reply with quote

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
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Wed Jan 20, 2010 10:59 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Jan 21, 2010 5:49 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts Copy only TEXT or String from a record SYNCSORT 4
No new posts how to eliminate null indicator value... DB2 7
No new posts Use Copy Utility DB2 7
No new posts VSAM LISTCAT INFORMATION JCL & VSAM 2
Search our Forums:

Back to Top