Transferring Data to DOS Random Files

When creating DOS random file data definitions, system data changes as follows:
  • Binary fields on the iSeries, eServer™ i5, or System i5® and the workstation are represented as two-complement numbers, so it is unnecessary to change individual bytes. The workstation uses the convention of storing numeric values with the least significant byte in the left-hand byte position. The data transfer function then reverses the order of the bytes in the binary fields.

    For example, X'CEF3', coming from the system as a 2-byte binary number (representing the value -12557), appears as X'F3CE'.

  • EBCDIC character, date, time, and time-stamp data changes byte by byte and is mapped into ASCII characters as defined by the translation tables.
  • Variable-length and null fields are converted to fixed length, and trailing blanks (for character, hex, date, time, and time stamp) or zeros (for binary, zoned, and packed) are added to the maximum length of the field.
  • Hexadecimal fields do not change.
  • Packed decimal fields do not change except for the last half-byte, which contains the sign. The workstation uses X'3' to indicate a positive number and X'B' to indicate a negative number in the sign half-byte.

    For example, X'0865431F' appears as X'08654313'.

  • Zoned decimal fields from the system change from EBCDIC to ASCII, as do character fields, except that the sign half-byte in the workstation changed field is X'3' to indicate a positive number and X'B' to indicate a negative number.

    For example, EBCDIC X'F0F1F2F5F2D6' appears as ASCII X'3031323532B6'.