View previous topic :: View next topic
|
Author |
Message |
SathyaS
New User
Joined: 20 Sep 2005 Posts: 11
|
|
|
|
I have two input files. One file should be copied to a output file while the other file needs to be copied to multiple output files. Is there any way to achieve this in a single step by using utilities like IEBGENR/IEBCOPY?
Thanks in advance. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
An IDCAMS REPRO job would work well, as would ICETOOL (DFSORT) or SYNCTOOL (SYNCSORT). |
|
Back to top |
|
|
rajandhla
Active User
Joined: 18 Oct 2005 Posts: 182 Location: Luton UK
|
|
|
|
//SPLITBY EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE,DISP=OLD
//01 DD DSN=FILE01,DISP=MOD
//02 DD DSN=FILE02,DISP=MOD
//03 DD DSN=FILE03,DISP=MOD
//04 DD DSN=FILE04,DISP=MOD
//05 DD DSN=FILE05,DISP=MOD
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=(01,02,03,04,05)
/*
Regards
jai |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
SathyaS,
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1
//IN2 DD DSN=... input file2
//OUT1 DD DSN=... output file for IN1
//MULT1 DD DSN=... output file1 for IN2
//MULT2 DD DSN=... output file2 for IN2
...
//MULTn DD DSN=... output filen for IN2
//TOOLIN DD *
* Copy IN1 to OUT1
COPY FROM(IN1) TO(OUT1)
* Copy IN2 to MULT1-MULTn
COPY FROM(IN1) TO(MULT1,MULT2,...,MULTn)
/*
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Jai,
Your job doesn't do what was asked for and will get a JCL error for the 01-05 ddnames (a ddname cannot start with a number). I suspect you meant to use SORTOF01-SORTOF05 for the ddnames, but that still doesn't do what was requested.
Please try to read peoples' posts more carefully to understand what they want. Please test your jobs before posting them to avoid confusing people. |
|
Back to top |
|
|
|