Page 1 of 1

Single input file matching

PostPosted: Wed Aug 17, 2011 6:41 pm
by GRAMBO
I have a single input file, and am matching the items within it. Each record can have at most 1 matching record, sometimes there is no matche. (but no no duplicates)

I have the following JCL which is producing 1 record for each of the matching lines, as I want.

However, I am struggling to understand if it is possible to produce a seperate file of the unmatched items, I know this can be done with 2 input files, but can it be done with just one? Thanks.

//SPLICE03 EXEC PGM=ICETOOL,COND=(0,NE)                   
//TOOLMSG  DD  SYSOUT=*                                   
//DFSMSG   DD  SYSOUT=*                                   
//INFILE1  DD  DSN=DEA......... 
//OUT2     DD  DSN=DEA.........
//             DISP=(NEW,CATLG,DELETE),                   
//             SPACE=(CYL,(100,50),RLSE)                   
//TOOLIN DD  *                                                           
  SPLICE FROM(INFILE1) TO(OUT2) ON(5,37,CH) WITH(103,4) - 
  WITHALL KEEPNODUPS USING(CTL1)                           
/*                                                         
//CTL1CNTL DD *                                           
  OUTFIL FNAMES=OUT2,                                     
  OUTREC=(5,102)                                           
//*                                                       

Re: Single input file matching

PostPosted: Wed Aug 17, 2011 10:53 pm
by Frank Yaeger
If I understand what it is you want to do, the "Keep dropped duplicate records (XSUM)" Smart DFSORT Trick at:

http://www.ibm.com/support/docview.wss? ... g3T7000094

shows how to do it.

If that's not what you want, then you need to do a better job of explaining what you're trying to do with sample input and expected output.