Sri,
I used some various types of JOIN UNPAIRED - thank you!
I did the job.
Observation: JOIN steps need significantly more memory than regular SORT. 48M was not enough. I changed it to 128M.

Now it's time for learning - while I can use some statements I do not necessarily know what can I put together in single SYSIN command set. Sometimes I meet the goal within few steps instead one. :-)

However I learned new features, thank everyone who helped me.

--
Radoslaw Skorupka
Lodz, Poland




W dniu 07.09.2021 o 17:13, Sri h Kolusu pisze:
1. SUM FIELDS=NONE  - is it just to omit duplicates of SUM records?
Radoslaw,


I used SUM FIELDS=NONE, to eliminate a cartesian join when matching. For
example if you have 10 duplicates for key 'ABC' and 5 duplicates for 'SUM'
then the result will be a cartesian join of (10 X 5 = 50 records). So I
eliminated the duplicates on key SUM so that it will only produce 10
records for 'ABC'

2. How to get ABC records with no corresponding SUM record?
By default Joinkeys produces only matched records, however it is a simple
fix to get the unmatched records using JOIN UNPAIRED.

You can find detailed information about the various types of joins here

https://www.ibm.com/docs/en/zos/2.4.0?topic=files-join-statement


So use the updated control cards.


//SORTOUT  DD SYSOUT=*
//MATCH    DD SYSOUT=*
//ONLYF1   DD SYSOUT=*
//SYSIN    DD *
   OPTION COPY
   JOINKEYS F1=INA,FIELDS=(96,10,A)
   JOINKEYS F2=INB,FIELDS=(14,10,A)
   JOIN UNPAIRED,F1
   REFORMAT FIELDS=(F1:1,4,?,F1:5)

   OUTFIL FNAMES=MATCH,
   INCLUDE=(5,1,CH,EQ,C'B'),
   BUILD=(1,4,6)

   OUTFIL FNAMES=ONLYF1,
   INCLUDE=(5,1,CH,EQ,C'1'),
   BUILD=(1,4,6)
/*


Also please go thru the various examples of Joinkeys shown here

https://www.ibm.com/docs/en/zos/2.4.0?topic=files-joinkeys-application-examples



Thanks,
Kolusu
DFSORT Development
IBM Corporation

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

Reply via email to