bonniem
New User
Joined: 09 Aug 2005 Posts: 67
|
|
|
|
If your control card has the following OUTFIL statement
SORT FIELDS=COPY
OUTFIL FILES=(1,2),SPLIT
Then the input records will be evenly split between the output files. In this above case there are 2 output files. The first output file will have record numbers 1,3,5, etc and the second file will have 2,4,6 etc. |
|
jz1b0c
Active User
Joined: 25 Jan 2004 Posts: 160 Location: Toronto, Canada
|
|
|
|
Hi Vishal,
Here is the example.
//JZ1B0CQ JOB (JZ1B0C,@),
// 'OUTFIL EXAMPLE',
// CLASS=0,
// MSGCLASS=R,
// TIME=(60),
// MSGLEVEL=(1,1),
// NOTIFY=JZ1B0C
//STEP010 EXEC PGM=SORT ,COND=(0,NE)
//*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
//SORTIN DD DSN=JZ1B0C.MASTER.INPUT,
// DISP=SHR
//*
//FILE1 DD DSN=JZ1B0C.SPLIT.FILE1,
// DISP=(NEW,CATLG),RECFM=FB,LRECL=80,
// UNIT=SYSDA,
// MGMTCLAS=WORK5
//*
//FILE2 DD DSN=JZ1B0C.SPLIT.FILE2,
// DISP=(NEW,CATLG),RECFM=FB,LRECL=80,
// UNIT=SYSDA,
// MGMTCLAS=WORK5
//*
//FILE3 DD DSN=JZ1B0C.SPLIT.FILE3,
// DISP=(NEW,CATLG),RECFM=FB,LRECL=80,
// UNIT=SYSDA,
// MGMTCLAS=WORK5
//*
//SYSIN DD *
SORT FIELDS(1,4,CH,A)
OUTFIL INCLUDE=(1,4,CH,EQ,C'2001'),FNAMES=FILE1
OUTFIL INCLUDE=(1,4,CH,EQ,C'2002'),FNAMES=FILE2
OUTFIL SAVE,FNAMES=FILE3
END
/*
File3 is going to have the one's that are not in file1 and file2 |
|