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

Multiple copy Dataset


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

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Tue May 12, 2009 9:41 pm
Reply with quote

I have three Dataset A, B and C

I need to copy A to A1, B to B1 and C to C1. I should do all this copy within a single step. Could you please provide sample JCL to achieve this.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue May 12, 2009 10:12 pm
Reply with quote

You can use a DFSORT job like the following to do what you asked for.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//A DD DSN=...  input file A
//B DD DSN=...  input file B
//C DD DSN=...  input file C
//A1 DD DSN=...  output file A1
//B1 DD DSN=...  output file B1
//C1 DD DSN=...  output file C1
//TOOLIN DD *
COPY FROM(A) TO(A1)
COPY FROM(B) TO(B1)
COPY FROM(C) TO(C1)
/*
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Wed May 13, 2009 2:18 pm
Reply with quote

Thanks frank
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed May 13, 2009 5:12 pm
Reply with quote

Hi,

I ask the question, what is the big deal about a single step job when there are no savings, ?

If copy 2 or copy 3 fail, you will need to rerun the entire job amd depending on the size of the files you are copying it could be a significant amount of time lost.

Gerry
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed May 13, 2009 5:24 pm
Reply with quote

Hi Gerry !

The only big deal is, that there is a possibility to do it.

"Omnes Viae Ducunt Romam" as i learned in classical Latin years ago.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed May 13, 2009 5:39 pm
Reply with quote

Hi Umeysan,

capisco, I learned that in Italy. icon_lol.gif


Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed May 13, 2009 8:41 pm
Reply with quote

Hello,

Quote:
The only big deal is, that there is a possibility to do it.
And if a thing can be done (i.e. is possible) someone will find a way to make it a requirement, not just an option. . . icon_smile.gif

I firmly believe that not everything that can be done should be done. . .
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Wed May 13, 2009 10:34 pm
Reply with quote

Hi,

Can we do the same with IDCAM Utility. If yes could please let me know

Quote:
what is the big deal about a single step job when there are no savings


Answer:

We have some program which is generating reports and directly sending to VIS, but now it is needed to send to Dataset and then to reports instead of direct routing from program to Reports.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed May 13, 2009 11:55 pm
Reply with quote

Hello,

Quote:
but now it is needed to send to Dataset and then to reports instead of direct routing from program to Reports.
Ok, but why does this need to be done in a single step?

If the report volume is small, you might use idcams, but if there is high volume, using the sort for the copy is a far better choice.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu May 14, 2009 2:11 am
Reply with quote

The advantage of running these copies in 3 separate jobs is that they can run in parallel and are rerunable separately. I also believe in "just because a task can be run one way doesn't mean it should be".
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Thu May 14, 2009 5:46 pm
Reply with quote

Hi Dick,

Quote:
Ok, but why does this need to be done in a single step?


In my JCL each step is generating nearly 30 Reports.

So now my process is I will send the reports to Dataset and if I use IDCAMS it will increase around 30 steps. So i want to do this in a single step.
Back to top
View user's profile Send private message
maheshvamsi

New User


Joined: 22 Mar 2008
Posts: 39
Location: bangalore

PostPosted: Thu May 14, 2009 7:26 pm
Reply with quote

you can do it by using idcams.

Code:
//COPY01   EXEC PGM=IDCAMS,REGION=4M       
//SYSPRINT   DD SYSOUT=*                   
//SYSOUT   DD  SYSOUT=*                   
//SYSUDUMP DD  SYSOUT=*                   
//IN1  DD DISP=SHR,DSN= input file 1                   
//IN2 DD DISP=SHR,DSN=  inut file 2                   
//IN3 DD DISP=SHR,DSN=  input file 3                   
//OUT   DD SYSOUT=*                       
//OUT1  DD SYSOUT=*                       
//OUT2  DD SYSOUT=*                       
//SYSIN DD  *                             
   REPRO INFILE(IN1) OUTFILE(OUT) REPLACE 
   REPRO INFILE(IN2) OUTFILE(OUT1) REPLACE
   REPRO INFILE(IN3) OUTFILE(OUT2) REPLACE
/*                                         
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Thu May 14, 2009 8:27 pm
Reply with quote

Thanks Mahes.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu May 14, 2009 8:32 pm
Reply with quote

Hello,

Why did you switch to idcams - the more resource wasting alternative. . .?

You were given a sort solution before idcams was even mentioned icon_confused.gif
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri May 15, 2009 9:11 am
Reply with quote

I think you'll find that SORT will usually outperform most other programs to accomplish a copy.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top