Page 1 of 1

COPY with INLCUDE - size of temp storage for large file?

PostPosted: Mon Nov 28, 2011 10:39 pm
by rmd3003
Hi there. Let's say I have very large file (thousands of cylinders on DASD) and I need to eliminate some records. Two questions:
1. Which will give me better performance INCLUDE or OMIT? Or it doesn't matter?
2. Second question is if I use option COPY/INLCUDE without actual re-sorting do I have to allocate extra SORTWKxx datasets?
For example:

//STEP1     EXEC PGM=SYNCSORT
//SORTIN    DD DSN=TEST.FILE.IN,DISP=SHR       
//SORTOUT   DD DSN=TEST.FILE.OUT,                 
//             DISP=(NEW,CATLG,DELETE),                       
//             UNIT=SYSDA,SPACE=(CYL,(3000,1000),RLSE),           
//             DCB=(RECFM=FB,LRECL=1000,BLKSIZE=0,DSORG=PS)     
//SORTWK01  DD UNIT=WORK,SPACE=(CYL,(100,100),RLSE)             
//SORTWK02  DD UNIT=WORK,SPACE=(CYL,(100,100),RLSE)             
//SORTWK03  DD UNIT=WORK,SPACE=(CYL,(100,100),RLSE)             
//SORTWK04  DD UNIT=WORK,SPACE=(CYL,(100,100),RLSE)             
//SORTWK05  DD UNIT=WORK,SPACE=(CYL,(100,100),RLSE)
//SORTMSG   DD SYSOUT=*                                       
//SYSOUT    DD SYSOUT=*                                       
//SYSUDUMP  DD SYSOUT=*                                       
//SYSIN     DD *                 
    OPTION COPY                   
    OMIT COND=(1,4,ZD,GT,5555)   
/*                               


Thank you.

Re: COPY with INLCUDE - size of temp storage for large file?

PostPosted: Wed Nov 30, 2011 6:28 am
by BillyBoyo
I can't imagine that OMIT and INCLUDE would perform differently. Use the one which is easiest to understand for your requriments.

With OPTION COPY you need zero work datasets, it will just read the input, look at the include/omit, write to output if necessary, repeat until end-of-file. No work dataset activity.