Field | Start Position | End Position | Record Value |
A | 0 | 3 | Character value “AB” encodes to 5 bytes: |123O. The character “A” is represented by bytes 1 and 2. The character “B” is represented by byte 3. |
B | 4 | 8 | Character value “C” encodes to 4 bytes: |45O. |
Note: | A different method of encoding, using a “padding” byte, would have produced this result: |123450P where P is an added padding byte, to extend the record length to the required eight bytes. The parser does not use this method of encoding. Using this method, extracting the value for the second field produces: 450P The parser cannot properly write this byte sequence. All fixed position fields must be encoded as if they were a stand-alone sequence of bytes. No stateful encoding information may be carried from one fixed position field to any other fixed position field. However, delimited fields may carry stateful information from one field to the next field. In contrast, delimited records may not carry stateful information from one record to the next record. Thus, delimited fields are not necessarily “self contained”, but delimited records are. |