NOF Output screen data format is different from input screen data formats, and since NOF output does not go through screen formatting routines, the format is also different from the format of output sent to a station. These differences are as follows.
Numeric attributes are not zero suppressed, except after a Recall logic command or a REFRESH Painter command.
Physical decimal points are not present in decimal-keyed items.
Physical separator characters are not present.
Numeric attributes are always right-justified.
A leading blank is output for each separator and the decimal point character.
Signs of numeric items are output by adjustment of the last digit of the property, as shown in the following table. If positively signed numeric items are returned through a Recall command with no changes in Ispec logic, they are output with no adjustment of the last digit.
Last digit Numeric Value | Output Value If Positive | Output Value If Negative |
---|---|---|
0 | < | > |
1 | A | J |
2 | B | K |
3 | C | L |
4 | D | M |
5 | E | N |
6 | F | O |
7 | G | P |
8 | H | Q |
9 | I | R |
Although you must allow output positions for the one-character or two-character sign value for EDIT +, -, DR, and CR items, ignore any value in these positions.
The following table lists examples of the COBOL equivalents for various attributes properties when part of NOF output. The Screen Example column shows the same output as it would appear in a Direction Out, No Persistence property on a screen, having gone through screen formatting routines. In the table, the character b denotes a space.
Attribute Properties | NOF Input COBOL Format | NOF Example | Screen Example | |||
---|---|---|---|---|---|---|
Primitive | Length | Decimal | Screen Edit Type | |||
String | 5 | PIC X(5) | ABCDE | ABCDE | ||
Number | 5 | PIC 9(5) | 12345 | 12345 | ||
Signed Number | 5 | - | PIC S9(5) PIC X | 1234N b | 12345- | |
Signed Number | 5 | DR | PIC S9(5) PIC XX | 1234E bb | 12345DR | |
Number | 5 | 2 No Decimal-keyed | PIC 9(3)V9(2) | 12345 | 12345 | |
Signed Number | 5 | 2 Decimal-keyed | + | PIC S9(3)V9(2) PIC X | 1234E B | 123.45+ |
Signed Number | 5 | 2 Decimal-keyed | DR | PIC S9(3)V9(2) PIC XX | 1234E bb | 123.45DR |
Signed Number | 5 Suppress zeros | DR | PIC S9(5) PIC XX | 0012C bb | bb123DR | |
Number | 5 Suppress zeros | 2 No Decimal-keyed | DR | PIC S9(3)v9(2) | 00123 | bb123 |
Signed Number | 6 Separator Char Suppress zeros | 2 Decimal-keyed | + | PIC S9(4)V9(2) PIC X | 123456 b | 1,234.56 + |
Signed Number | 5 Suppress zeros | 2 Decimal-keyed | DR | PIC S9(3)v9(2) | 0012C | bb123DR |
The final format output required by a NOF program varies depending upon your requirements. For this reason, formatting of the NOF output is the responsibility of your NOF program or terminal.