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
 

 

Way to copy three files, into three files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ankita Maheshwari

New User


Joined: 12 May 2010
Posts: 24
Location: Pune

PostPosted: Fri May 14, 2010 3:58 pm    Post subject: Way to copy three files, into three files
Reply with quote

Hi,

Please tell me a way to copy three files, into three files.

For example:

First input file A.B.C should be copied in X.Y.Z

Second File A1.B1.C1 should be copied in X1.Y1.Z1

Third file A2.B2.C2 should be copied in X2.Y2.Z2

All this should be done in one step.

I have coded it this way:

Code:
//S002    EXEC PGM=IEBGENER                                     
//SYSUT1  DD  DSN=UPLOAD.SBT.PART1.FEB25.SBT,           
//            DISP=SHR                                         
//        DD  DSN=UPLOAD.SBT.PART2.FEB25.SBT,           
//            DISP=SHR                                         
//        DD  DSN=UPLOAD.SBT.PART3.FEB25.SBT,           
//            DISP=SHR                                         
//SYSUT2  DD  DSN=UPLOAD.SBT.PART1.FEB25.SBT,           
//            DISP=(NEW,CATLG,DELETE),                         
//            UNIT=SYSDA,                                       
//            SPACE=(350,(100,50),RLSE),                       
//            AVGREC=K,                                         
//            DCB=(RECFM=FB,LRECL=350,BLKSIZE=3500,DSORG=PS)   
//        DD  DSN=UPLOAD.SBT.PART2.FEB25.SBT,           
//            DISP=(NEW,CATLG,DELETE),                         
//            UNIT=SYSDA,                                       
//            SPACE=(250,(100,50),RLSE),                       
//            AVGREC=K,                                         
//            DCB=(RECFM=FB,LRECL=250,BLKSIZE=2500,DSORG=PS)   
//        DD  DSN=UPLOAD.SBT.PART3.FEB25.SBT,           
//            DISP=(NEW,CATLG,DELETE),                         
//            UNIT=SYSDA,                                       
//            SPACE=(250,(100,50),RLSE),                               
//            AVGREC=K,                                                 
//            DCB(RECFM=FB,LRECL=250,BLKSIZE=2500,DSORG=PS)   

But it is not working icon_neutral.gif


Please suggest a way in which this can be done.

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

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 14, 2010 4:12 pm    Post subject:
Reply with quote

What you have coded is wrong, so it will not work.
Learn what is concatenation of datasets first.

You can do it in one step using ICETOOL multiple COPY operators for each copy operation.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Fri May 14, 2010 4:17 pm    Post subject: Reply to: Copy the files
Reply with quote

Quote:
All this should be done in one step.

do You have a Physician prescription for that ??

if You have one, then use some other utility

click on the manual link at the top of the page
IBM JCL Utilities Guide for DFSMS
to see why IEBGENER can not do it

also if You had not noticed ...
SYSUT2 point to an output dataset,
and You can not concatenate datasets in output
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Fri May 14, 2010 4:18 pm    Post subject:
Reply with quote

Hi,

If you have DFSORT - ICETOOL, Something like below...
Code:
//STEP0100 EXEC PGM=ICETOOL       
//TOOLMSG  DD SYSOUT=*             
//DFSMSG   DD SYSOUT=*             
//OUT1     DD SYSOUT=*             
//OUT2     DD SYSOUT=*             
//OUT3     DD SYSOUT=*             
//IN1      DD *                   
111                               
FIRST                             
/*                                 
//IN2      DD *                   
222                               
SECOND                             
/*                                 
//IN3      DD *                   
333                               
LAST                               
/*                                 
//TOOLIN   DD *                   
  COPY FROM(IN1)  TO(OUT1)         
  COPY FROM(IN2)  TO(OUT2)         
  COPY FROM(IN3)  TO(OUT3)         
/*                                 
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri May 14, 2010 4:54 pm    Post subject:
Reply with quote

I believe that you could use multiple REPRO commands (of IDCAMS) and also accomplish the three file copy in one step.

but all this emphasis on one step, is just idiot interviewer's idea of conducting an interview.
Back to top
View user's profile Send private message
Ankita Maheshwari

New User


Joined: 12 May 2010
Posts: 24
Location: Pune

PostPosted: Fri May 14, 2010 5:39 pm    Post subject: Reply to: Way to copy three files, into three files
Reply with quote

Thanks it worked........... i used ICETOOL method to do it.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 964
Location: Richmond, Virginia

PostPosted: Fri May 14, 2010 7:15 pm    Post subject:
Reply with quote

Please explain, though, why you need one step. Are you trying to save certain resources? Seems the same space/time would be needed by three steps (with excrutiatingly negligible overhead differences).

Three steps offer (offers?) the advantage of future changes not accidentally breaking working code.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 247
Location: Cincinnati OH USA

PostPosted: Fri May 14, 2010 7:49 pm    Post subject:
Reply with quote

teacher said we had to do it that way.
Back to top
View user's profile Send private message
Ankita Maheshwari

New User


Joined: 12 May 2010
Posts: 24
Location: Pune

PostPosted: Mon May 17, 2010 12:04 pm    Post subject: Reply to: Way to copy three files, into three files
Reply with quote

This is the requirement to do make one step to copy all the files icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Mon May 17, 2010 12:08 pm    Post subject: Reply to: Way to copy three files, into three files
Reply with quote

Quote:
This is the requirement to do make one step to copy all the files

as already remarked by Phil, it' s a stupid one!
if it was a teacher who required it... better look for a different job ( the teacher )
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 getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am


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