Both Files Matching Records (Inner Join) Write only records that match on key from both files. //STEP01 EXEC PGM=SORT //SYSPRINT DD. It is a simple JOINKEYS: OPTION COPY JOINKEYS F1=INA,FIELDS=(4,80), SORTED,NOSEQCK JOINKEYS F2=INB,FIELDS=(4,80),SORTED,NOSEQCK JOIN. It is a simple JOINKEYS: OPTION COPY JOINKEYS F1=INA,FIELDS=(4,80), SORTED,NOSEQCK JOINKEYS F2=INB,FIELDS=(4,80),SORTED.
|Published (Last):||4 October 2017|
|PDF File Size:||6.9 Mb|
|ePub File Size:||3.39 Mb|
|Price:||Free* [*Free Regsitration Required]|
It is not exactly clear what output you want here. Yes, thanks, I was just typing, not testing: Sign up or log in Sign up using Google.
OUTFILs “run” concurrently as in the same record is presented to each in turn, then the next record, etc. It will contain wort paired F1 and F2 records as follows: Currently those are output as F2 appended to F1, and entire twice the size record written. Email Required, but never shown.
IBM MAINFRAME & MVS FORUM
That is what the question-mark? It will contain the unpaired F1 records as follows: The solution worked perfectly: Sign up using Email and Password. The REFORMAT statement defines the fields to be extracted for the joined records in the order in which they are to appear, and includes an indicator in the last position that will be set to ‘1’ if the key is found only in the F1 file, ‘2’ if the key is found only in the F2 file, or ‘B’ if the key is found in the F1 file and in the F2 file.
I have a small question. The assumption is that your data is in key order already. Joined Record Positions Extracted from F1 positions F2 positions 35 Indicator of where key was found.
Post as sorr guest Name. It is certainly useful for testing, even if you don’t want it in the final code. Then you need to output the data.
jcl – Sort unmatched records using joinkeys – Stack Overflow
These are the F2 records without a match in F1. What is the key? For F2 records without a match in F1 for example, the F record joinkesy, the indicator in position 35 has a ‘2’.