Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 3 - Create files with matching and non-matching records z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example shows how you can match records in input data sets
1 and 2 to produce three output data sets with:
We copy the IN1 records to the T1 data set and add an identifier of '11' to show they come from FILE1. We copy the IN2 records to the end (MOD) of the T1 data set and add an identifier of '22' to show they come from FILE2. We sort the records of T1 on positions 1-3 and splice the second id byte for matching records. We use KEEPNODUPS to keep non-duplicate records. The records look like this after they are
sorted, but before they are spliced:
The records look like this after they are
spliced, but before we do the OUTFIL processing
specified by CTL3CNTL with USING(CTL3) for SPLICE:
An id of 12 indicates an ON field that appears in IN1 and IN2. An id of 11 indicates an ON field that appears only in IN1. An id of 22 indicates an ON field that appears only in IN2. The OUTFIL statements in CTL3CNTL write the records to their appropriate output data sets (without the ids) as follows: OUT12 contains:
OUT1 contains:
OUT2 contains:
|
Copyright IBM Corporation 1990, 2014
|