The RUI_INIT verb transfers control of the specified LU to the Windows LUA application. RUI_INIT establishes a session between the SSCP and the specified LU.
Note For 3270 emulator users, a Microsoft® SNA Server extension has been added that allows you to use 3270 LUs rather than the LUA LUs. For more information, see Remarks in this topic.
The following structure describes the LUA_COMMON member of the VCB used by RUI_INIT.
struct LUA_COMMON {
unsigned short lua_verb;
unsigned short lua_verb_length;
unsigned short lua_prim_rc;
unsigned long lua_sec_rc;
unsigned short lua_opcode;
unsigned long lua_correlator;
unsigned char lua_luname[8];
unsigned short lua_extension_list_offset;
unsigned short lua_cobol_offset;
unsigned long lua_sid;
unsigned short lua_max_length;
unsigned short lua_data_length;
char FAR * lua_data_ptr;
unsigned long lua_post_handle;
struct LUA_TH lua_th;
struct LUA_RH lua_rh;
struct LUA_FLAG1 lua_flag1;
unsigned char lua_message_type;
struct LUA_FLAG2 lua_flag2;
unsigned char lua_resv56[7];
unsigned char lua_encr_decr_option;
};
RUI_INIT requires this parameter.
This parameter is eight bytes long, padded on the right with spaces (0x20) if the name is shorter than eight characters.
For all other environments, this parameter is reserved and should be set to zero.
LUA_MESSAGE_TYPE_LU_DATA
LUA_MESSAGE_TYPE_SSCP_DATA
LUA_MESSAGE_TYPE_BID
LUA_MESSAGE_TYPE_BIND
LUA_MESSAGE_TYPE_BIS
LUA_MESSAGE_TYPE_CANCEL
LUA_MESSAGE_TYPE_CHASE
LUA_MESSAGE_TYPE_CLEAR
LUA_MESSAGE_TYPE_CRV
LUA_MESSAGE_TYPE_LUSTAT_LU
LUA_MESSAGE_TYPE_LUSTAT_SSCP
LUA_MESSAGE_TYPE_QC
LUA_MESSAGE_TYPE_QEC
LUA_MESSAGE_TYPE_RELQ
LUA_MESSAGE_TYPE_RQR
LUA_MESSAGE_TYPE_RTR
LUA_MESSAGE_TYPE_SBI
LUA_MESSAGE_TYPE_SHUTD
LUA_MESSAGE_TYPE_SIGNAL
LUA_MESSAGE_TYPE_SDT
LUA_MESSAGE_TYPE_STSN
LUA_MESSAGE_TYPE_UNBIND
The SLI receives and responds to the bind, crv, and stsn requests through the LUA interface extension routines.
lu_data, lustat_lu, lustat_sscp, and sscp_data are not SNA commands.
Values from 1 through 127 are not supported.
For a Windows version 3.x system, the Windows LUA VCB does not contain the valid procedure address returned by the MakeProcInstance command.
For OS/2, the Windows LUA VCB does not contain a valid semaphore or queue handle, which is needed when the verb completes asynchronously.
· The verb could not be issued because the application had already reached its maximum number of active sessions. In the Windows environment, an application can have as many as 16 sessions active at any time. On Windows NT, Windows 95, and OS/2, an application can have as many as 512 sessions active at any time. |
· The verb could not be issued because the application had already reached its maximum number of active sessions. In the Windows environment, an application can have as many as 16 sessions active at any time. In OS/2, an application can have as many as 512 sessions active at any time. |
This verb must be the first LUA verb issued for the session. Until this verb has completed successfully, the only other LUA verb that can be issued for this session is RUI_TERM (which terminates a pending RUI_INIT).
All other verbs issued on this session must identify the session using one of the following parameters from this verb:
RUI_INIT completes after an ACTLU message is received from the host. If necessary, the verb waits indefinitely. If an ACTLU has already been received prior to RUI_INIT, LUA sends a NOTIFY to the host to inform it that the LU is ready for use. Note that neither ACTLU nor NOTIFY is visible to the LUA application.
After RUI_INIT has completed successfully, this session uses the LU for which the session was started. No other LUA session (from this or any other application) can use the LU until RUI_TERM is issued, or until an LUA_SESSION_FAILURE primary return code is received.
To provide 3270 emulator users the ability to use the Emulator Interface Specification (EIS) configuration call with the RUI API, an SNA Server extension has been added to the RUI. This extension allows you to use 3270 LUs rather than LUA LUs. If an application sets lua_resv56[1] to a nonzero value on the RUI_INIT call then 3270 LUs can be used.
If an application sets lua_resv56[2] to a nonzero value on the RUI_INIT call then the RUI library will not release the LU when the LU-SSCP session or connection goes away. When this SNA Server extension is enabled, the application does not have to issue a new RUI_INIT after a session failure or connection failure. When the LU-SSCP session comes back up (the application can use WinRUIGetLastInitStatus to detect this), the application can start using it again.
If an application sets lua_resv56[3] to a nonzero value on the RUI_INIT session establishment, this enables an SNA Server extension that can change the behavior of RUI_READ. The default behavior for an RUI_READ call is to truncate data (discarding any data remaining) if the application's data buffer is not large enough for receive all of the data in the RU, returning an error code. When lua_resv56[3] is set to a nonzero value on the RUI_INIT call, then an RUI_READ issued where the application's data buffer is not large enough will not result in the RU data being discarded. The RUI_READ verb will return success (LUA_OK) for the primary return code and LUA_DATA_INCOMPLETE for the secondary return code. Subsequent RUI_READ requests can then be issued to retrieve the data that exceeded the application's data buffer.
If an application sets lua_resv56[4] to a nonzero value on the RUI_INIT session establishment, this enables an SNA Server extension and the RUI library will allow the application to keep hold of the LU if it is recycled at the host (that is, deactivated and reactivated).
Note All other reserved fields must be left blank.
For more information, see the description of the sepdcrec function in the Microsoft SNA Server 3270 Emulator Interface Specification.
Session-level cryptography is implemented through Cryptography Verification (CRV) requests; RUI applications must perform all necessary processing of these requests. For all interfaces other than RUI, CRV requests are rejected with a negative response by the SNA Server.
For RUI_INIT, the following options are supported:
Values from 1 through 127 (ACSRENCR and ACSROECR routines) are not supported.
The sending application is responsible for padding data to a multiple of eight bytes and for setting the padded data indicator bit in the RH as well as for encryption. The receiving application is responsible for removing the padding after decryption.