Positions 37-46 (Field Location)
Positions 37-46 (Field Location)
Entry : Explanation
Two 1- to 5-digit numbers : Beginning of a field (from) and end of a field (to).
This entry describes the location and size of each field in the input record. Positions 37 through 41 specify the location of the field’s beginning position; positions 42 through 46 specify the location of the field’s end position. To define a single-position field, enter the same number in positions 37 through 41 and in positions 42 through 46. Numeric entries must be right-adjusted; leading zeros can be omitted.
The maximum number of positions in the input record for each type of field is as follows:
Positions : Type of Field
63 : Zoned decimal numeric (63 digits)
32 : Packed numeric (63 digits)
4 : Binary-decimal (9 digits)
8 : Integer (20 digits)
8 : Unsigned (20 digits)
8 : Float (8 bytes)
64 : Numeric with leading or trailing sign (63 digits)
10 : Date
8 : Time
26 : Timestamp
32766 : Character (32766 characters)
32766 : Graphic or UCS-2 (16383 double-byte characters)
32766 : Variable-Length Character (32764 characters)
32766 : Variable-Length Graphic or UCS-2 (16382 double-byte characters)
32766 : Data structure
The maximum size of a character or data structure field specified as a program described input field is 32766 since that is the maximum record length for a file.
When specifying a variable-length character, graphic, or UCS-2 input field, the length includes the 2 byte length prefix.
For arrays, enter the beginning position of the array in positions 37 through 41 and the ending position in positions 42 through 46. The array length must be an integral multiple of the length of an element. The From-To position does not have to account for all the elements in the array. The placement of data into the array starts with the first element.