ICETOOL - compare 2 input files



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Re: ICETOOL - compare 2 input files

Postby skolusu » Thu Oct 18, 2012 10:30 pm

bittybit,

Use the following DFSORT JCL which will give you the desired results. We expanded the 8 byte PD field to 16 bytes using HEX function and then we use the first 13 bytes for matching.

//STEP0100 EXEC PGM=SORT           
//SYSOUT   DD SYSOUT=*             
//INA      DD DSN=Your Input VB file1,DISP=SHR
//INB      DD DSN=Your Input VB file2,DISP=SHR
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *                   
  OPTION COPY                     
  JOINKEYS F1=INA,FIELDS=(5,13,A) 
  JOINKEYS F2=INB,FIELDS=(5,13,A) 
  REFORMAT FIELDS=(F1:1,4,21)     
//*                               
//JNF1CNTL DD *                   
  INREC BUILD=(1,4,55,8,HEX,5)     
//*                               
//JNF2CNTL DD *                   
  INREC BUILD=(1,4,55,8,HEX,5)     
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

These users thanked the author skolusu for the post:
bitbybit (Fri Oct 19, 2012 1:51 am)
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: ICETOOL - compare 2 input files

Postby bitbybit » Thu Oct 18, 2012 11:38 pm

Hi Kolusu,
1. in "FIELDS=(5,13,A)" is that "A" is for to tell the input file is in Asc order or to sort the o/p in asc order? My input files are in desc order by that key?
2. I want the o/p to be sorted Asc by the full acct# fld - s9(15) comp-3
3. can u pls explain what's that "REFORMAT FIELDS=(F1:1,4,21)" does?
bitbybit
 
Posts: 29
Joined: Fri Jul 13, 2012 10:05 pm
Has thanked: 6 times
Been thanked: 0 time

Re: ICETOOL - compare 2 input files

Postby BillyBoyo » Thu Oct 18, 2012 11:42 pm

1. Not the output, but for the JOIN itself.
2. You say the first 13 are unique in the file, so it should be in that order without having to sort on the remainder.
3. Since the HEX value is no longer required, and since you variable-length data starts at 21, it now says 21 instead of 5.

These users thanked the author BillyBoyo for the post:
bitbybit (Fri Oct 19, 2012 1:51 am)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: ICETOOL - compare 2 input files

Postby bitbybit » Thu Oct 18, 2012 11:56 pm

yes...that 13 byte (key) is unique for each input file. and both files are sorted in desc by whole 15 byte fld. I need my o/p to be sorted on that 15 byte, but in Asc order....I just ran my test file with the above code and it worked and the o/p is in sort order asc by 15 byte. I will increase test data and see what happens....Thank you both for your help.
bitbybit
 
Posts: 29
Joined: Fri Jul 13, 2012 10:05 pm
Has thanked: 6 times
Been thanked: 0 time

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post