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

Need JCL to Copy 5 Vsam files to 5 different Vsam files


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

New User


Joined: 22 Oct 2007
Posts: 3
Location: Bangalore

PostPosted: Fri Apr 11, 2008 9:42 am
Reply with quote

Hi ,

I need a JCL to Copy/Repro VSAM file to Another VSAM file. I need to copy 5 vsam files to 5 different VSAM files.I do not have File-aid installed.Can i have a single JCL which does this at one go.
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Fri Apr 11, 2008 9:57 am
Reply with quote

HI,


I think you can do one by one using REPRO,


Code:
//SYSIN    DD *
   
     INDATASET(INPUT.DATA.SET.NAME)-
     OUTDATASET(OUTPUT.DATAS.SET.NAME)
/*



Every time just change the dataset names.

or else u can organise STEP1, STEP2, STEP3 and so on.
Back to top
View user's profile Send private message
Ajith Kumar

New User


Joined: 22 Oct 2007
Posts: 3
Location: Bangalore

PostPosted: Fri Apr 11, 2008 11:00 am
Reply with quote

Hi,

Thank You for the reply .Could You please give me detail steps that has to be followed for writing the JCL for all the 5 vsam file.I need to submit the job only once and all the files has to be copied
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Apr 11, 2008 11:09 am
Reply with quote

Why not ask one of Your peers, or search the net a bit....

a google search on "vsam repro idcams" yielded exactly what You are looking for...

try, and if Your jcl gives errors post the result and somebody will try to help You
Back to top
View user's profile Send private message
vinodmaanju

New User


Joined: 10 May 2005
Posts: 28
Location: Pune

PostPosted: Fri Apr 11, 2008 11:12 am
Reply with quote

You can execute multiple commands in same step.

for ex-

//SYSIN DD *
REPRO -
INDATASET(INPUT.DATA.SET.NAME1)-
OUTDATASET(OUTPUT.DATAS.SET.NAME1)

REPRO -
INDATASET(INPUT.DATA.SET.NAME2)-
OUTDATASET(OUTPUT.DATAS.SET.NAME2)

REPRO -
INDATASET(INPUT.DATA.SET.NAME3)-
OUTDATASET(OUTPUT.DATAS.SET.NAME3)

REPRO -
INDATASET(INPUT.DATA.SET.NAME4)-
OUTDATASET(OUTPUT.DATAS.SET.NAME4)

REPRO -
INDATASET(INPUT.DATA.SET.NAME5)-
OUTDATASET(OUTPUT.DATAS.SET.NAME5)
/*
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Fri Apr 11, 2008 11:42 am
Reply with quote

vinodmaanju wrote:
You can execute multiple commands in same step.

for ex-

//SYSIN DD *
REPRO -
INDATASET(INPUT.DATA.SET.NAME1)-
OUTDATASET(OUTPUT.DATAS.SET.NAME1)

REPRO -
INDATASET(INPUT.DATA.SET.NAME2)-
OUTDATASET(OUTPUT.DATAS.SET.NAME2)

REPRO -
INDATASET(INPUT.DATA.SET.NAME3)-
OUTDATASET(OUTPUT.DATAS.SET.NAME3)

REPRO -
INDATASET(INPUT.DATA.SET.NAME4)-
OUTDATASET(OUTPUT.DATAS.SET.NAME4)

REPRO -
INDATASET(INPUT.DATA.SET.NAME5)-
OUTDATASET(OUTPUT.DATAS.SET.NAME5)
/*


I think you have to check
Code:
LASTCC = 00
for each of the REPRO command is executed.

Correct me if am incorrect.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 11, 2008 11:55 am
Reply with quote

The REPRO commands are not conditionally linked, so why the need to check the previous RC ?
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Fri Apr 11, 2008 12:13 pm
Reply with quote

Hi Expat,





I executed the above code i got RC = 12

we have to check the Last Completion Code is succsessfull or not other wise it wouldn't works.
Back to top
View user's profile Send private message
Ajith Kumar

New User


Joined: 22 Oct 2007
Posts: 3
Location: Bangalore

PostPosted: Fri Apr 11, 2008 12:37 pm
Reply with quote

Thanks ,it works
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top