Wow!

Thank you for this recipe and information about JOINKEYS. I had to play a bit 
with REFORMAT to understand it and get what I need.

Before you post this, I have already found SPLICE example 8 in the same 
publication and was also able to get the results I wanted. I would never come 
to JOINKEYS myself. 

Have a nice day!

-- 
Zaromil



On Thu, 24 May 2012 08:34:44 -0700, Sri h Kolusu wrote:

>Zaromil,
>
>You can use DFSORT's JOINKEYS to compare the datasets. Here is a sample
>job which will compare the 2 datasets treating the first 2 bytes as a key
>to compare. You can have a maximum of 4080 bytes as a key.
>
>//STEP0100 EXEC PGM=SORT
>//SYSOUT   DD SYSOUT=*
>//INA      DD *
>C1
>B1
>A1
>E1
>//INB      DD *
>A1
>B1
>C1
>D1
>//SORTOUT  DD SYSOUT=*
>//SYSIN    DD *
>  OPTION COPY
>  JOINKEYS F1=INA,FIELDS=(1,2,A)
>  JOINKEYS F2=INB,FIELDS=(1,2,A)
>  JOIN UNPAIRED
>  REFORMAT FIELDS=(F1:1,10,F2:1,10,?)
>  OUTFIL IFOUTLEN=25,
>  IFTHEN=(WHEN=(21,1,CH,EQ,C'B'),BUILD=(01,10,C'MATCHED RECORD')),
>  IFTHEN=(WHEN=(21,1,CH,EQ,C'1'),BUILD=(01,10,C'ONLY FILE1 REC')),
>  IFTHEN=(WHEN=(21,1,CH,EQ,C'2'),BUILD=(11,10,C'ONLY FILE2 REC'))
>//*
>
>The output from this job is
>
>A1        MATCHED RECORD
>B1        MATCHED RECORD
>C1        MATCHED RECORD
>D1        ONLY FILE2 REC
>E1        ONLY FILE1 REC
>
>Check this link for a detailed explanation of JOINKEYS
>
>http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA60/4.0?
>
>Further if you have any questions please let me know
>
>Thanks,
>Sri Hari Kolusu
>DFSORT Development
>IBM Corporation

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to