DEACTIVATE_SESSION
The DEACTIVATE_SESSION verb requests the deactivation of a particular session, or all sessions on a particular mode.
VCB Structure
typedef struct deactivate_session
{
unsigned short opcode; /* verb operation code */
unsigned char reserv2; /* reserved */
unsigned char format; /* format */
unsigned short primary_rc; /* primary return code */
unsigned long secondary_rc; /* secondary return code */
unsigned char lu_name[8]; /* local LU name */
unsigned char lu_alias[8]; /* local LU alias */
unsigned char session_id[8]; /* session identifier */
unsigned char plu_alias[8]; /* partner LU alias */
unsigned char mode_name[8]; /* mode name */
unsigned char type; /* deactivation type */
unsigned char reserv3[3]; /* reserved */
unsigned long sense_data; /* deactivation sense data */
unsigned char fqplu_name[17]; /* fully qualified partner */
/* LU name */
unsigned char reserv4[20]; /* reserved */
} DEACTIVATE_SESSION;Supplied Parameters
The application supplies the following parameters:
- opcode
- AP_DEACTIVATE_SESSION
- format
- Identifies the format of the VCB. Set this field to zero to specify the version of the VCB listed above.
- lu_name
- LU name of the local LU requested to deactivate a session. This name is an 8-byte type-A EBCDIC character string. If this field is set to all zeros, the lu_alias field will be used for determining the local LU.
- lu_alias
- Alias of the local LU requested to deactivate a session. This is an 8-byte string in a locally displayable character set. This field is only significant if the lu_name field is set to all zeros, in which case all 8 bytes are significant and must be set. If both the lu_name and the lu_alias fields are set to all zeros then the verb is forwarded to the LU associated with the control point (the default LU).
- session_id
- 8-byte identifier of the session to deactivate. If this field is set to all zeros, Personal Communications or Communications Server deactivates all sessions for the partner LU and mode.
- plu_alias
- Alias by which the partner LU is known to the local LU. This name must match the name of a partner LU established during configuration. This is an 8-byte string in a locally displayable character set. All 8 bytes are significant and must be set. If this field is set to all zeros, the fqplu_name field is used to specify the required partner LU.
- mode_name
- Name of a set of networking characteristics defined during configuration. This is an 8-byte alphanumeric type-A EBCDIC string (starting with a letter), padded to the right with EBCDIC spaces.
- type
- Type of deactivation. This field is a bitmask consisting of a deactivation
type ORed with a flag indicating whether the verb should complete asynchronously
or synchronously.
Deactivation types:
- AP_DEACT_CLEANUP
- The session is terminated immediately, without waiting for a response from the partner LU.
- AP_DEACT_NORMAL
- The session terminates after all conversations using the session are ended.
Verb behavior:
- AP_ASYNCHRONOUS_DEACTIVATION
- The verb returns immediately.
- AP_SYNCHRONOUS_DEACTIVATION
- The verb returns only after the session has been deactivated.
- sense_data
- Specifies the sense data to be used for the CLEANUP type of deactivation.
- fqplu_name
- Fully qualified LU name for the partner LU. This name is 17 bytes long and is right-padded with EBCDIC spaces. It is composed of two type-A EBCDIC character strings concatenated by an EBCDIC dot. (Each name can have a maximum length of 8 bytes with no embedded spaces.) This field is only significant if the plu_alias field is set to all zeros.
Returned Parameters
If the verb executes successfully, the Program returns the following parameter:
- primary_rc
- AP_OK
Note that if the session_id cannot be matched with any existing sessions, it is assumed that this is because the session has already been deactivated. In this case the verb completes successfully.
If the verb does not execute because of a parameter error, the Program returns
the following parameters:
- primary_rc
- AP_PARAMETER_CHECK
- secondary_rc
- AP_INVALID_MODE_NAME
AP_INVALID_PLU_NAME
AP_INVALID_CLEANUP_TYPE
AP_INVALID_LU_NAME
AP_INVALID_LU_ALIAS
If the verb does not execute because the node has not yet been started, the Program returns
the following parameter:
- primary_rc
- AP_NODE_NOT_STARTED
If the verb does not execute because the node is stopping, the Program returns
the following parameter:
- primary_rc
- AP_NODE_STOPPING
If the verb does not execute because of a system error, the Program returns
the following parameter:
- primary_rc
- AP_UNEXPECTED_SYSTEM_ERROR