Positions 40 through 43 define the end position of a field or constant on the output record, or define the length of the data description specifications record format name for a program described WORKSTN file.
The K identifies the entry as a length rather than an end position, and the number following the K indicates the length of the record format name. For example, if the format name is CUSPMT, the entry in positions 42 and 43 is K6. Leading zeros are permitted following the K, and the entry must be right-adjusted.
Valid entries for end positions are blanks, +nnn, -nnn, and nnnn. All entries in these positions must end in position 43. Enter the position of the rightmost character of the field or constant. The end position must not exceed the record length for the file.
If an entire array is to be written, enter the end position of the last element in the array in positions 40 through 43. If the array is to be edited, be careful when specifying the end position to allow enough positions to write all edited elements. Each element is edited according to the edit code or edit word.
The +nnn or -nnn entry specifies the placement of the field or constant relative to the end position of the previous field. The sign must be in position 40. The number (nnn) must be right-adjusted, but leading zeros are not required. To calculate the end position, use these formulas:
EP = PEP +nnn + FL
EP = PEP -nnn + FL
EP is the calculated end position. PEP is the previous end position. For the first field specification in the record, PEP is equal to zero. FL is the length of the field after editing, or the length of the constant specified in this specification. The use of +nnn is equivalent to placing nnn positions between the fields. A -nnn causes an overlap of the fields by nnn positions. For example, if the previous end position (PEP) is 6, the number of positions to be placed between the fields (nnn) is 5, and the field length (FL) is 10, the end position (EP) equals 21.
When *PLACE is used, an actual end position must be specified; it cannot be blank or a displacement.
An entry of blank is treated as an entry of +000. No positions separate the fields.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.