Previous Page Contents Page Next Page

3.7 RUI_TERM

The RUI_TERM verb ends both the LU session and the SSCP session for a given LU.

3.7.1 Supplied Parameters

The application supplies the following parameters:

lua_verb

LUA_VERB_RUI

lua_verb_length

The length in bytes of the LUA verb record.

Set this to sizeof(struct LUA_COMMON).

lua_opcode

LUA_OPCODE_RUI_TERM

lua_correlator

Optional. A four-byte value that you can use to correlate this verb with other processing within your application. LUA does not use or change this information.

lua_luname

The name in ASCII of the LU used by the session. This must match the LU name of an active LUA session, as returned on the RUI_INIT verb (or the LU name that was specified on an outstanding RUI_INIT or RUI_REINIT verb).

This parameter is required only if the lua_sid parameter is 0 (zero). If a session ID is supplied in lua_sid, LUA does not use this parameter.

This parameter must be eight bytes long; pad on the right with spaces, 0x20, if the name is shorter than eight characters.

lua_sid

The session ID of the session. This must match a session ID returned on a previous RUI_INIT verb.

This parameter is optional; if you do not specify the session ID, you must specify the LU name for the session in the lua_luname parameter.

lua_post_handle

A pointer to a callback routine that LUA will call to indicate completion if the verb completes asynchronously.

If the VCB is used in a RUI function call, set this field to an event handle. If the VCB is used in a WinRUI function call, this field is reserved.

For more information, see Designing and Writing LUA Applications.

3.7.2 Returned Parameters

LUA always returns the following parameter:

lua_flag2.async

This flag is set to 1 if the verb completed asynchronously, or 0 if the verb completed synchronously.

Other returned parameters depend on whether the verb completed successfully; see the following sections.

Successful Execution

If the verb executes successfully, LUA returns the following parameters:

lua_prim_rc

LUA_OK

Unsuccessful Execution

If a verb does not complete successfully, LUA returns a primary return code to indicate the type of error and a secondary return code to provide specific details about the reason for unsuccessful execution.

Parameter Check

The following return codes indicate that the verb did not complete successfully because a supplied parameter was in error:

lua_prim_rc

LUA_PARAMETER_CHECK

lua_sec_rc

Possible values are:

LUA_BAD_SESSION_ID

The lua_sid parameter did not match the session ID of any active LUA LU session.

LUA_INVALID_POST_HANDLE

The lua_post_handle parameter was not a valid pointer to a callback routine.

LUA_RESERVED_FIELD_NOT_ZERO

A reserved field in the verb record, or a parameter that is not used by this verb, was set to a nonzero value.

LUA_VERB_LENGTH_INVALID

The value of the lua_verb_length parameter was less than the length of the verb record required for this verb.

State Check

The following return codes indicate that the verb was issued in a session state in which it was not valid:

lua_prim_rc

LUA_STATE_CHECK

lua_sec_rc

LUA_NO_RUI_SESSION

Either there is no LUA session with the LU name specified on this verb, or the session has failed.

If the RUI_TERM verb was issued to cancel an outstanding RUI_INIT or RUI_REINIT verb, using the lua_luname parameter supplied to the outstanding verb, this return code may indicate that the RUI_INIT or RUI_REINIT completed before this verb was processed. The verb may have completed unsuccessfully (and so there is no session), or RUI_INIT may have completed successfully using a different LU from the pool specified by lua_luname (and so there is no session for the specified LU name).

Other Conditions

The following return codes indicate that the verb record supplied was valid, but the verb did not complete successfully:

lua_prim_rc

LUA_UNSUCCESSFUL

lua_sec_rc

Possible values are:

LUA_COMMAND_COUNT_ERROR

An RUI_TERM was already pending when the verb was issued.

LUA_INVALID_PROCESS

The operating system process that issued this verb was not the same process that issued the RUI_INIT verb for this session. Only the process that started a session can issue verbs on that session.

The following return codes indicate that the verb did not complete successfully for other reasons:

lua_prim_rc

LUA_COMM_SUBSYSTEM_ABENDED

A required SNAP-IX software component (such as the node) has terminated or has been stopped. Contact your System Administrator if necessary.

lua_prim_rc

LUA_SESSION_FAILURE

The LUA session has failed.

lua_sec_rc

Possible values are:

LUA_LU_COMPONENT_DISCONNECTED

This return code indicates that the LUA session has failed because of a problem with the communications link or with the host LU.

LUA_RUI_LOGIC_ERROR

This return code indicates one of the following:

  • The host system has violated SNA protocols

  • An internal error was detected within LUA

Attempt to reproduce the problem with SNA tracing active (contact your System Administrator if necessary), and check that the host is sending correct data. If this does not solve the problem, contact your SNAP-IX support personnel.

lua_prim_rc

LUA_INVALID_VERB

Either the lua_verb parameter or the lua_opcode parameter was not valid. The verb did not execute.

lua_prim_rc

LUA_STACK_TOO_SMALL

The stack size of the application is too small for LUA to complete the request. Increase the stack size of your application.

lua_prim_rc

LUA_UNEXPECTED_DOS_ERROR

An operating system error occurred.

lua_sec_rc

This value is the operating system return code. Check your operating system documentation for the meaning of this return code.

lua_prim_rc

LUA_COMM_SUBSYSTEM_NOT_LOADED

The node was either not started or not configured properly for LUA applications. Check the SNAP-IX LUA configuration parameters and start the node before running your application.

3.7.3 Interaction with Other Verbs

This verb may be issued at any time after the RUI_INIT or RUI_REINIT verb has been issued (whether or not it has completed).

If any other LUA verb is pending when RUI_TERM is issued, no further processing on the pending verb will take place, and it will return with a primary return code of LUA_CANCELLED.

After this verb has completed, no other LUA verb can be issued for this session.

Previous Page Contents Page Top of Page Next page