Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us