Columns 20-80 Factor 2 Constant [ HP RPG/XL Utilities-Part 1 XSORT ] MPE/iX 5.0 Documentation
HP RPG/XL Utilities-Part 1 XSORT
Columns 20-80
Factor 2 Constant
If factor 2 is a constant, you use columns 20-80 to enter the constant
you have selected. Normally, columns 40-80 are reserved for comments.
They can, however, be used as necessary for constants longer than 20
characters or digits. The constant can be any arrangement of characters.
When you enter a constant containing character data, placing a C in
column 8, your entry must be the same length as the factor 1 field and
must begin in column 20. Although the XSORT specification form includes
72 columns, your entries can extend to 80 columns.
Numeric Constants
Numeric constants are always right-justified according to their length.
They must be the same length as the factor 1 field. If the factor 1
field is packed, the length of the factor 2 field will be twice as long.
For example, if factor 1 was a six position field in the input record and
factor 2 was the numeric constant 135, you would have to right justify
your factor 2 entry to column 25. You would enter 135 in columns 23, 24,
and 25. It would not be necessary to include leading zeros since XSORT
reads blanks and zeros the same.
Unpacked Constants
Unpacked constants must be the same length as the factor 1 field.
Suppose your factor 1 field takes up four positions. Your entry for
factor 2 must do the same. If the factor 2 constant is the value 5, you
would enter a 5 in column 23. You could leave 20, 21, and 22 blank or
fill them with zeros.
Negative unpacked constants require special attention. The negative sign
must be "overpunched" on the last digit of the constant.
---------------------------------------------------------------------------------------------
| |
| Coding Negative Constants (Unpacked) |
| |
---------------------------------------------------------------------------------------------
| | |
| If last digit in constant is: | You replace it with this character: |
| | |
---------------------------------------------------------------------------------------------
| | |
| 0 | } (right brace) |
| | |
---------------------------------------------------------------------------------------------
| | |
| 1 | J |
| | |
---------------------------------------------------------------------------------------------
| | |
| 2 | K |
| | |
---------------------------------------------------------------------------------------------
| | |
| 3 | L |
| | |
---------------------------------------------------------------------------------------------
| | |
| 4 | M |
| | |
---------------------------------------------------------------------------------------------
| | |
| 5 | N |
| | |
---------------------------------------------------------------------------------------------
| | |
| 6 | O |
| | |
---------------------------------------------------------------------------------------------
| | |
| 7 | P |
| | |
---------------------------------------------------------------------------------------------
| | |
| 8 | Q |
| | |
---------------------------------------------------------------------------------------------
| | |
| 9 | R |
| | |
---------------------------------------------------------------------------------------------
Packed Constants
Packed numbers in this entry receive different treatment. If factor 1
contains a packed number, the length of the constant must be twice the
length of the factor 1 field. This includes the sign, "+" or "-", which
must be placed in the rightmost position of the constant after the last
digit (negative signs cannot be "overpunched" on the last digit of the
constant as they are for unpacked numbers).
For example, here is the entry required to make a sort in which the
record must contain a packed negative 3 (-3) in positions 3 and 4, an
unpacked negative 24 (-24) in positions 10-13, and an unpacked negative
11 (-11) in positions 17-22.
MPE/iX 5.0 Documentation