Notes on Using This Function

  1. If a return code of 31 occurs for the Get Key function, either:
    • Increase the value of the calling length parameter for the Start Keystroke Intercept (50) function, or
    • Execute the Get Key function more frequently.

    An intercepted keystroke occupies 3 bytes in the buffer. The next intercepted keystroke is placed in the adjacent three bytes. When the Get Key function retrieves a keystroke (first in first out, FIFO), the three bytes that it occupied are made available for another keystroke. By increasing the size of the buffer or the rate at which keystrokes are retrieved from the buffer, you can eliminate buffer overflow.

    For the PC/3270, another way to eliminate return code 31 is to operate the PC/3270 emulator in the resume mode.

  2. You can use the Send Key (3) function to pass both original keystrokes and any others that your EHLLAPI application might need to the host-connected presentation space.
  3. Keystrokes arrive asynchronously and are enqueued in the keystroke queue that you have provided in your EHLLAPI application program using the Start Keystroke Intercept (50) function.
  4. The Get Key function behaves like a read. When keystrokes are available, they are read into the data area that you have provided in your application.
  5. In the case of field support for a session, the application might be interested only in AID keys, for example the Enter key. If so, the Start Keystroke Intercept (50) function option code should be set to D (meaning for AID Keys only).
  6. To use this function, preallocate memory to receive the returned data string parameter. The statements required to preallocate this memory vary depending on the language in which your application is written. Refer to Memory Allocation for more information.