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
 

 

Multiple copy Dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Multiple copy Dataset
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 Moderator


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

PostPosted: Tue May 12, 2009 10:12 pm    Post subject:
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    Post subject: Reply to: Multiple copy Dataset
Reply with quote

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

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed May 13, 2009 5:12 pm    Post subject:
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: 743
Location: Germany

PostPosted: Wed May 13, 2009 5:24 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Wed May 13, 2009 5:39 pm    Post subject:
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

Site Director


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

PostPosted: Wed May 13, 2009 8:41 pm    Post subject:
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    Post subject: Reply to: Multiple copy Dataset
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

Site Director


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

PostPosted: Wed May 13, 2009 11:55 pm    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Thu May 14, 2009 2:11 am    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

Thanks Mahes.
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 May 14, 2009 8:32 pm    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Fri May 15, 2009 9:11 am    Post subject:
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    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 syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am


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