Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 12 z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example illustrates how you can right-justify fields within your records. The 50-byte FB input records might look like this:
Note that the second field has left-justified
numeric values in various forms. We want to right-justify these values
and surround them with a left parenthesis and right parenthesis.The 50-byte FB output records look like this:
We use OUTFIL OVERLAY to limit the changes to the second field. We use JFY to right-justify the second field with surrounding parentheses. SHIFT=RIGHT shifts the characters to the right. LEAD=C'(' adds a left parenthesis before the first non-blank character. TRAIL=C')' adds a right parenthesis after the last non-blank character. LENGTH=18 increases the output length by 2 bytes to allow for the parentheses (overriding the default of 16 from the input length). |
Copyright IBM Corporation 1990, 2014
|