Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 11 z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example illustrates how you can find a value in FB or VB records and overlay it with a larger value without shifting other bytes in the records. The FB input records might look like this:
We want to replace every instance of 'BALANCE dddd' with 'BALANCE 1000' where dddd can be any value. We use IN=C'BALANCE' to indicate we want to find each instance of 'BALANCE'. We use OUT='BALANCE 1000' to indicate we want to replace it with 'BALANCE 1000'. We use SHIFT=NO to do an overlay, overriding the default of shifting bytes. Since we only have at most one instance of 'BALANCE dddd' in a record, we can use DO=1 to stop processing a record after one replacement of 'BALANCE dddd' with 'BALANCE 1000'. In this case, DO=1 is more efficient than the default of continuing to look for more instances of 'BALANCE dddd' after the first instance. We would get the same result without DO=1, just less efficiently The output records look like this:
|
Copyright IBM Corporation 1990, 2014
|