Transferring Data to DOS Random Type-2 Files

When you create DOS random type-2 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 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 fields change byte by byte and are 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. The sign convention used on the workstation and on the host system is the same.

    For example, X'0865431C' appears as X'0865431C'.

  • Zoned decimal fields from the system change from EBCDIC to ASCII, as do character fields. However, the sign half-byte is changed to a 3 to indicate a positive number or a 7 to indicate a negative number when the data is sent to the workstation.

    For example, EBCDIC X'F0F1F2F5F2D6' appears as ASCII X'303132353276'.