Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 27 z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example illustrates how you can replace values in FB or VB records with larger values and shift the rest of the bytes to the right. The 40 byte FB input records might look like this:
We want to replace each instance of 'AM' with 'IN THE MORNING' and each instance of 'PM' with 'IN THE EVENING' and shift the bytes after 'AM' or 'PM' to the right. We use INOUT to indicate find and replace pairs. Since replacing the smaller values with the larger values can cause the remaining bytes to be shifted beyond the end of the 40 byte record, we use MAXLEN to set the output record to 70 bytes to allow for the expansion, overriding the default of using the input length for the output record. The 70 byte FB output records look like this:
|
Copyright IBM Corporation 1990, 2014
|