MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Copy a file into number of output files

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Thu Jan 03, 2008 6:03 am    Post subject: Copy a file into number of output files Reply with quote

Hi ,

I have a req like this a i/p is being used by five jobs at time causing the contention probelm.So we decided to copy these file into five ouput files having the same data.I know who to split the file into different output files but don't know how copy same file into different output files.Please help me.

Thanks,
Siva
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Thu Jan 03, 2008 9:51 am    Post subject: Reply with quote

What kind of contention problem are you having? If you have a sequential file used as input with DISP=SHR, it shouldn't matter if you have 5 jobs referencing the file or 500.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Jan 03, 2008 11:08 am    Post subject: Reply with quote

sivafdms,

You can use the following DFSORT Job to copy a single file into multiple files.
Code:

//STEP0100 EXEC PGM=ICEMAN               
//SYSOUT   DD SYSOUT=*                   
//SORTIN   DD DSN=YOUR INPUT FILE,
//            DISP=SHR
//OUT1     DD DSN=YOUR OUTPUT FILE1,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y,),RLSE)
//OUT2     DD DSN=YOUR OUTPUT FILE2,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y,),RLSE)
//OUT3     DD DSN=YOUR OUTPUT FILE3,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y,),RLSE)
//OUT4     DD DSN=YOUR OUTPUT FILE4,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y,),RLSE)
//OUT5     DD DSN=YOUR OUTPUT FILE5,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y,),RLSE)
//SYSIN    DD *                           
  SORT FIELDS=COPY                       
  OUTFIL FNAMES=(OUT1,OUT2,OUT3,OUT4,OUT5)
/*


Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Jan 03, 2008 11:35 am    Post subject: Reply with quote

Or you can use the following DFSORT/ICETOOL job:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD DSN=...  input file
//OUT1 DD DSN=...  output file 1
//OUT2 DD DSN=...  output file 2
//OUT3 DD DSN=...  output file 3
//OUT4 DD DSN=...  output file 4
//OUT5 DD DSN=...  output file 5
//TOOLIN DD *
COPY FROM(IN) TO(OUT1,OUT2,OUT3,OUT4,OUT5)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Fri Jan 04, 2008 7:44 am    Post subject: Reply with quote

Frank/Kolusu,

Thanks for ur help.
I could choose any one them


Thanks,
Siva
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group