Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 10 - Create spliced variable-length records from two files z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example shows how you can splice data together for each pair
of records with the same ON field in two different VB input data sets,
even when records are of different lengths.
VAR.INPUT1 has RECFM=VB and LRECL=25. It contains the base records
which look like this:
VAR.INPUT2 has RECFM=VB and LRECL=50. It contains the overlay
records which look like this:
Because some of the overlay records are longer than their corresponding base records, we use VLENMAX to ensure that none of the data from the overlay records is lost. VLENMAX ensures that the larger length between the base record and overlay record is used for the spliced record, and that blanks are added to the end of the spliced record when needed. The base and overlay records from the concatenated data sets are
sorted and spliced. VAR.OUTPUT has RECFM=VB and LRECL=50. It contains
the spliced records, which look like this:
Notice that VLENMAX
prevented any data from being lost. Without VLENMAX, data would have
been lost; the spliced records would have looked like this:
|
Copyright IBM Corporation 1990, 2014
|