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 5 Vsam files to 5 different Vsam files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Need JCL to Copy 5 Vsam files to 5 different Vsam files
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: 276
Location: Bang,iflex

PostPosted: Fri Apr 11, 2008 9:57 am    Post subject:
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    Post subject: Reply to: Need JCL to Copy 5 Vsam files to 5 different Vsam
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Fri Apr 11, 2008 11:09 am    Post subject: Reply to: Need JCL to Copy 5 Vsam files to 5 different Vsam
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    Post subject:
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: 276
Location: Bang,iflex

PostPosted: Fri Apr 11, 2008 11:42 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 11, 2008 11:55 am    Post subject:
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: 276
Location: Bang,iflex

PostPosted: Fri Apr 11, 2008 12:13 pm    Post subject:
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    Post subject: Reply to: Need JCL to Copy 5 Vsam files to 5 different Vsam
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    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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm


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