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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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