Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ SLI_CLOSE(3) — SNA LUA 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SLI_CLOSE(3)  —  Subroutines

 
 
 
 

Name

SLI_CLOSE − Closes the LU-LU session terminating the connection to the remote host application program and relinquishes the local LU. 
 
 
 

FORMAT

#include <lua_c.h>
 
void SLI(LUA_VERB_RECORD ∗sli_close_vcb);
 
 
 
 

Parameter

 

sli_close_vcb
 
 
A pointer to an LUA_VERB_RECORD structure appropriately initialized for the SLI_CLOSE verb. 
 
 
 

Required Verb Control Block Fields

 

common.lua_verb
 
 
An unsigned short value specifying the verb code LUA_VERB_SLI. 
 

common.lua_verb_length
 
 
An unsigned short value specifying the length of the verb control block. Specify the value LUA_COMMON_LENGTH. 
 

common.lua_post_handle
 
 
A pointer to a sem_t structure specifying the wait object that the interface should use for asynchronous calls. 
 

common.lua_opcode
 
 
An unsigned short value specifying the verb opcode.  Specify the value LUA_OPCODE_SLI_CLOSE. 
 

common.lua_luname
 
 
An unsigned char 8-element array specifying the local LU name (in ASCII). If the name is fewer than 8 characters in length, pad the name with space characters. 
 
 

common.lua_cobol_ptr
 
 
 
This parameter is not currently implemented and should be set to NULL.
 

common.sid
 
 
An unsigned int value specifying the session ID that the interface should use to identify the local LU. If this parameter is 0, the interface uses the common.lua_luname parameter. 
 

common.lua_flag1
 
 
An LUA_FLAG1 structure specifying various flags that control how the interface executes the verb.  The following flag is available:

 

close_abend---If set, specifies that the interface should perform an immediate close. See the Description section for more information. 

 
 
 

common.lua_flag3
 
 
 
This parameter is not currently implemented. Any fields set are ignored.
 
 
 
 

Optional Verb Control Block Fields

 

common.lua_correlator
 
 
A void ∗ pointer that can contain either a value or an address of a user-supplied data structure. The LUA application can use this parameter to correlate this verb control block with other user-supplied data structures.  The interface does not read from or write to this field. 
 
 
 
 

Returned Verb Control Block Fields

 

common.lua_prim_rc
 
 
An unsigned short value containing the primary error code. 
 
 

common.lua_sec_rc
 
 
An unsigned int value containing the secondary error code. 
 
 

common.lua_sid
 
 
An unsigned int value containing the session ID that subsequent verbs can use to specify the session to the interface. 
 

common.lua_flag2
 
 
An LUA_FLAG2 structure containing various flags that indicate how the interface executed the verb.  The following flag is returned:

 

async---If set, indicates that the interface is completing the verb asynchronously. 

 
 
 
 
 

Description

 
For closes with the Close Normal option (lua_flag1.close_abend = 0 ), the SLI_OPEN verb causes several SNA commands and responses to flow between the session partners. The command flow depends on whether the close sequence is initiated by the LUA application or by the remote host application. 

 
For LUA-initiated closes, the SLI does the following:
 
 

1Sends an RSHUTD command to the remote host application program. 
 

2Receives the RSHUTD response from the remote host application program. 
 

3Optionally, receives a CLEAR command from the remote host application program. 
 

4Optionally, sends the CLEAR response to the remote host application program. 
 

5Receives the UNBIND command from the remote host application program. 
 

6Sends the UNBIND response to the remote host application program. 
 

 
For remote host initiated closes, the SLI does the following: For closes initiated by the remote host application, the LUA application must first use the SLI_RECEIVE verb to receive the SHUTD request.

 
 
 

1Sends a CHASE command to the remote host application program. 
 

2Receives the CHASE response from the remote host application program. 
 

3Sends a Shutdown Complete (SHUTC) command to the remote host application program. 
 

4Receives the SHUTC response from the remote host application program. 
 

5Optionally, receives a CLEAR command from the remote host application program. 
 

6Optionally, sends the CLEAR response to the remote host application program. 
 

7Receives the UNBIND command from the remote host application program. 
 

8Sends the UNBIND response to the remote host application program. 
 

 
In both cases, the action taken by the SLI_CLOSE routine in response to the incoming UNBIND command varies depending on the value you supplied for the lua_session_type parameter on the SLI_OPEN request and the type of UNBIND received:

 

•lua_session_type = LUA_SESSION_TYPE_NORMAL

 
If the remote host sends an UNBIND type X’01’ (UNBIND Normal), the SLI closes the session. If the remote host sends an UNBIND type X’02’ (UNBIND with BIND forthcoming), the SLI completes the SLI_CLOSE request without closing the session and returns the primary return code LUA_CANCELLED and the secondary return code LUA_RECEIVED_UNBIND_HOLD.
 
 

•lua_session_type = LUA_SESSION_TYPE_DEDICATED

 
If the remote host sends an UNBIND type X’01’ (UNBIND Normal), the SLI completes the SLI_CLOSE request without closing the session and returns the primary return code LUA_CANCELLED and the secondary return code LUA_RECEIVED_UNBIND_NORMAL. If the remote host sends an UNBIND type X’02’ (UNBIND with BIND forthcoming), the SLI completes the SLI_CLOSE request without closing the session, and returns the primary return code LUA_CANCELLED and the secondary return code LUA_RECEIVED_UNBIND_HOLD.

 
 

 
The Close Abend option (lua_flag1.close_abend = 1 ) always forces an immediate close regardless of the setting of the lua_session_type parameter.  Before issuing the SLI_CLOSE request, be sure that you have sent all owed responses. If responses are still due, SLI_CLOSE changes the SLI_CLOSE from a normal close to an abend close. SLI_CLOSE can also change the close to an abend close if data has not been read using the SLI_RECEIVE verb. This occurs because the SLI assumes a response is owed for the unread message.

 
 

Primary Return Codes

 

LUA_OK
 

 

LUA_CANCELLED
 

LUA_COMM_SUBSYSTEM_ABENDED
 

LUA_COMM_SUBSYSTEM_NOT_LOADED
 

LUA_IN_PROGRESS
 

LUA_INVALID_VERB
 

LUA_INVALID_VERB_SEGMENT
 

LUA_PARAMETER_CHECK
 

LUA_SESSION_FAILURE
 
 

LUA_STATE_CHECK
 

LUA_UNEXPECTED_DOS_ERROR
 

LUA_UNSUCCESSFUL
 
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026