JCL sort JOIN statement is used to retrieve what record from input file 1 and input file 2. In case, If you don't specify a JOIN statement, only matched(i.e. paired) records from input file 1(F1) and input file 2(F2) are kept and processed by the main task as the joined records. This join we call it as an inner join.
JOIN UNPAIRED {F1/F2/ONLY} |
You can change which records are kept and processed by the main task as the joined records by specifying a JOIN statement. You must specify the UNPAIRED operand. The F1, F2 and ONLY operands are optional.
The JOIN operands you specify indicate the joined records to be kept and processed by the main task as follows:
Unpaired records from F1 and F2 as well as paired records. This is known as a full outer join.
Unpaired records from F1 as well as paired records. This is known as a left outer join.
Unpaired records from F2 as well as paired records. This is known as a right outer join.
Unpaired records from F1 and F2.
Unpaired records from F1.
Unpaired records from F2.
If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!