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

Need To Copy one file into nine files in one step


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

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Thu Dec 24, 2009 4:12 pm
Reply with quote

Hi,
I need to copy a same file into 9 files in a single step. I was doing with IEBGENER but it is only copying to first systut2 files and other 8 files are blank.Can anybody help me out.The code is

Code:
//CREATE1  EXEC PGM=IEBGENER                       
//SYSUT1   DD  DSN=TEST.SORT1,
//             DISP=SHR           
//SYSUT2   DD  DSN=TEST.COPYA,
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             LRECL=157,                         
//             RECFM=FB                           
//SYSUT2   DD  DSN=TEST.COPYB,
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             LRECL=157,                         
//             RECFM=FB                           
//SYSUT2   DD  DSN=TEST.COPYC,
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             LRECL=157,                         
//             RECFM=FB                           
//SYSUT2   DD  DSN=TEST.COPYD,
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             LRECL=157,                         
//             RECFM=FB                           
//SYSUT2   DD  DSN=TEST.COPYE,
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             LRECL=157,                         
//             RECFM=FB                           
//SYSUT2   DD  DSN=TEST.COPYF,
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             LRECL=157,                         
//             RECFM=FB                           
//SYSUT2   DD  DSN=TEST.COPYG,
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             LRECL=157,                         
//             RECFM=FB                           
//SYSUT2   DD  DSN=TEST.COPYH,
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             LRECL=157,                         
//             RECFM=FB                           
//SYSUT2   DD  DSN=TEST.COPYI,
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             LRECL=157,                         
//             RECFM=FB                           
//SYSPRINT DD SYSOUT=*


Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 24, 2009 4:24 pm
Reply with quote

IEBGENER is doing what you told him to do. Sort can be a choice, also.
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Thu Dec 24, 2009 4:27 pm
Reply with quote

can u plz suggest the code....
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Dec 24, 2009 4:36 pm
Reply with quote

A possibility :


IDCAMS :

REPRO IFILE(IN1) OFILE(OUT1) COUNT(X1)
REPRO IFILE(IN1) OFILE(OUT2) COUNT(X2) SKIP(X1)
REPRO IFILE(IN1) OFILE(OUT3) COUNT(X3) SKIP(X1 + X2)

ETC.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Dec 24, 2009 4:37 pm
Reply with quote

Hi Abhijit,

Topic has been discussed so many times. Please refer the below link.

www.ibmmainframes.com/viewtopic.php?t=42426&highlight=multiple+copy
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Thu Dec 24, 2009 4:59 pm
Reply with quote

Thanks it worked correctly.....
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 24, 2009 5:01 pm
Reply with quote

Glad to hear, next time please search the forum first... icon_smile.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: Sat Dec 26, 2009 11:03 am
Reply with quote

The MVS JCL Reference Manual would have told you immediately how JES treats duplicate ddnames.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sat Dec 26, 2009 2:12 pm
Reply with quote

Terry Heinze wrote:
The MVS JCL Reference Manual would have told you immediately how JES treats duplicate ddnames.

Yes Terry, but that would involve the OP reading it for himself icon_rolleyes.gif
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 4
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top