View previous topic :: View next topic
|
Author |
Message |
muthukumar
New User
Joined: 24 Mar 2004 Posts: 29
|
|
|
|
Hi,
Is it possible to create 2 different format of files for one input file in a single sort step
say if we have two OUTFIL statement for one input file with different include conditions. I want first 50 characters to be in the first file but i want the complete record in the second file. is it achievable
thanks
Muthu |
|
Back to top |
|
|
imvs
New User
Joined: 12 May 2004 Posts: 33
|
|
|
|
muthukumar,
//STEP1 EXEC PGM=ICETOOL
//INDD DSN = INPUT FILE
//OUTDD1 DSN =OUTPUT FILE CONTAINING WHOLE RECORD
//OUTDD2 DSN= OUTPUT FILE CONTAINING FIRST 50 BYTES
//TOOLIN DD *
COPY FROM(INDD) TO(OUTDD1)
COPY FROM(INDD) USING F50
/*
F50CNTL DD *
OUTFIL FNAMES=OUTDD2,OUTREC=(1,50)
/*
// |
|
Back to top |
|
|
muthukumar
New User
Joined: 24 Mar 2004 Posts: 29
|
|
|
|
thanks a lot |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You don't need two passes to do this. You can do it in one pass with DFSORT as follows:
Code: |
//STEP1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//OUTDD1 DSN=... output file containing entire record
//OUTDD2 DSN=... output file containing first 50 bytes
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUTDD1
OUTFIL FNAMES=OUTDD2,OUTREC=(1,50)
/*
|
|
|
Back to top |
|
|
|