Notes on Using This Function

  1. Return code 35 will be returned when the first Read Structured Fields or Write Structured Fields is requested after an outbound transmission from the host is canceled. Corrective action is the responsibility of the application.
  2. Return code 36 requires that the application disconnect from the emulation program and then reconnect to reestablish communications with the host. Corrective action is the responsibility of the application.
  3. Return code 37 will be returned if the host is inbound disabled.
  4. The EHLLAPI allows for a maximum of 20 asynchronous requests per application to be outstanding. A return code for unavailable resources (RC=11) is returned if more than 20 asynchronous requests are attempted.

The structured field data format is as follows:

Offset Length Contents
0 1 word X'0000'
2 1 word m (message length: the number of bytes of data in the message, the number does not include the buffer header prefix, which contains 8 bytes) This value must be set by the application.
4 1 word X'0000'
6 1 word X'0000'
8 8 bytes Length of the first (or only) structured field message.
10 1 byte First nonlength byte of the structured field message.
m+7 1 byte Last byte in the structured field message.

Bytes 0 through 7 are the buffer header. These first 8 bytes are used by the emulation program. The user section of the buffer begins with offset 8. Bytes 8 and 9 contain the number of bytes in the first structured field (a structured field message can contain multiple structured fields) including 2 bytes for bytes 8 and 9. Bytes 8 through m+7 are used for the structured field message sent to the host.