Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 25 z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example illustrates how you can create a report from FB input records with variable position/length fields, such as keyword delimited values. The 70-byte input records might look like this:
Note that each record has four variable fields each identified by a specific keyword. The fields do not start and end in the same position in every record and they have different lengths in different records. The output report has RECFM=FBA and LRECL=42 and looks like this:
In order to create a report like this from variable position/length fields, we use HEADER2 to create the page header, and PARSE and BUILD to create a fixed parsed field from each variable field. We use %00 to create an 11-byte fixed parsed field with the extracted 'LAST-> ' value. We use %01 to create an 11-byte fixed parsed field with the extracted 'FIRST-> ' value. We use %02 to create a 7-byte fixed parsed field with the extracted 'INITIAL-> ' value. We use %03 to create a 7-byte fixed parsed field with the extracted 'SCORE-> ' value. Since the fourth field (%03) is extracted as signed and padded on the right with blanks, we treat it as SFF format in order to edit it. |
Copyright IBM Corporation 1990, 2014
|