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 communication with the host. Corrective action is the responsibility of the application.
  3. Return code 37 will be returned if the host is inbound disabled. The Read Structured Fields function was successfully requested.
  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 contains the application structured fields received from the host. Structured field headers are removed by the EHLLAPI before the structured field data reaches the application.

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 is returned by EHLLAPI.
4 1 word n (buffer size: the supplied length of the data buffer that does include the 8-byte message header). This value must be set by the application.
6 1 word X'C000'.
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 received from the host (which could contain multiple structured fields).

The using application must furnish the complete buffer with the word at offset 0 set to zero. The buffer length must be in the word at offset 4. The word at offset 6 must be X'C000'. The emulation program will place the data message beginning at offset 8 and place the length of the message in the word at offset 2. The buffer length is not disturbed by EHLLAPI.