Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need JCL to Copy/Repro VSAM file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Need JCL to Copy/Repro VSAM file
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    Post subject: Re: Need JCL to Copy/Repro VSAM file to Another VSAM file
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    Post subject: Re: Need JCL to Copy/Repro VSAM file to Another VSAM file
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    Post subject: Reply to: Need JCL to Copy/Repro VSAM file to Another VSAM f
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

Site Director


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

PostPosted: Thu Jan 21, 2010 5:49 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us