Numeric data, by default, is printed using a standard method of editing. The ordering of the data into its final edited form, and the calculation of the number of print positions required to contain it, are based upon the length and precision of the field to be printed.
Numeric fields, defined in the GSA by a DEFINE command or defined implicitly with a precision in a SET, COMPUTE, or DECODE command, adopt the specified dimensions in the translation to their final edited form. Numeric fields defined in an input record use the field type specified in the DEFINE command to calculate the number of digits, integers, and the location of the decimal point.
The number of digits that can be contained within the field types N (zoned decimal) and P (packed decimal) are calculated as follows:
For fields defined as B (binary), the number of digits to be printed is calculated as follows:
The system assumes that all numeric fields to be printed have a plus or minus sign. Therefore, the rightmost position in this final edited form is reserved for a sign. The system suffixes positive or zero values with a single blank and negative values with a minus sign.
If the value contains both integers and decimals, the system prints both, separated by a decimal point. If the value contains no decimals, the rightmost integer prints adjacent to the sign position. If the value contains only decimals (no integers), a decimal point and a single zero print immediately to the left of the numeric value.
The calculation to determine the total number of characters required to print a numeric field can be summarized as follows:
|
Copyright © 2014 CA.
All rights reserved.
|
|