The first four bytes of a variable-length record on the mainframe is reserved for a record descriptor word (RDW) that indicates the length of the record. Because of this, the first byte of data in a variable-length record on the mainframe is actually the fifth byte of the record. In many non-mainframe environments, these four bytes are not considered part of the data, so the first byte of the data is the first byte of the record. (The RDW is essentially invisible to applications.)
Byte positions on the mainframe:
Byte positions on other systems:
Because of this difference, you will need to “drop” four bytes from the beginning of your record when creating record layouts for variable-length records in Connect ETL. The easiest way to do this is to build the record layout using the positions specified in the mainframe sort control statements and then shorten the first field by four bytes. If your data contains ASA (ANSI) control characters, you will need to drop an additional byte (for a total of five); see Work with Data that Contains ASA (ANSI) Control Characters.