z/OS Communications Server: SNA Programmer's LU 6.2 Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


LOSS function

z/OS Communications Server: SNA Programmer's LU 6.2 Guide
SC27-3669-00

VTAM® schedules the ATTN exit with LOSS in word 4 of the parameter list to inform the application program that a session has been deactivated. The ATTN(LOSS) exit is driven every time a session is deactivated or only when the last session of a mode name group is deactivated, depending on the ATNLOSS parameter on the application program's APPL definition statement.
  • If ATNLOSS=LAST, VTAM schedules the ATTN(LOSS) exit only when the last session on a mode name group is deactivated. This is the default.
  • If ATNLOSS=ALL, VTAM schedules the ATTN(LOSS) exit every time a session is deactivated.
However, if the application program is a communications network management application (indicated by AUTH=CNM on the APPL definition statement), VTAM schedules the ATTN(LOSS) exit every time a session is deactivated.
The exit is scheduled even if sessions are deactivated in an orderly fashion. The exit routine is scheduled, for example, when sessions are deactivated as a result of setting the session limits to 0. The exit is scheduled only when currently active sessions are deactivated. Session activation failures do not cause the exit to be scheduled, with two exceptions. VTAM schedules the exit if the session activation fails:
  • If the LU is single-session capable and has AUTOSES coded on its APPL definition statement.
  • To report an RPL6LAST value of B'11'

When the exit routine is entered, the read-only copy of the RPL and RPL extension contains the LU name (RPL6LU) of the partner and the mode name (RPL6MODE) of the session. Table 1 provides a list of the types of information provided by VTAM and the RPL6X field that contains the information.

Table 1. Information provided in the RPL6X field
Information Provided RPL6X Field
Session ID RPL6SSID
Session ID length RPL6SIDL
Session completion sense code RPL6SNSI
Session deactivation reason code RPL6DERC
Session deactivation type RPL6DETP
Whether the deactivated session is:
  • Just another session — B'00'
  • The last session to this LU for this particular modename — B'01'
  • The last session to this LU for all non-control modenames (SNASVCMG, CPSVCMG, and CPSVRMGR are control modes) — B'10'
  • The last session to this LU for all modenames — B'11'
RPL6LAST

To perform the safest application termination, complete the following steps:

  1. Issue an APPCCMD CONTROL=OPRCNTL, QUALIFY=DEFINE macroinstruction to set session limits to 0. This macroinstruction prevents a CNOS from a partner LU from starting a session successfully.
  2. Issue an APPCCMD CONTROL=OPRCNTL, QUALIFY=CNOS to set session limits to 0 for all non-control mode modenames (for example, SLCALL=X'10').
  3. When RPL6LAST indicates that all non-control mode sessions have ended, issue an APPCCMD CONTROL=OPRCNTL, QUALIFY=CNOS to set SNASVCMG session limits to 0.
  4. When RPL6LAST indicates that all sessions have ended, use the CLOSE macroinstruction to close the ACB.
An orderly session deactivation is indicated by:
  • A sense code of 0
  • A reason code of 0 (normal)
  • A deactivation type of either X'01' or X'02'
Other combinations of these parameters indicate an abnormal deactivation of the session. For example, an APPCCMD CONTROL=REJECT, QUALIFY=SESSION macroinstruction can be issued to deactivate a session with either X'0F' or X'FE '. For a description of this macroinstruction, refer to z/OS Communications Server: SNA Programmer's LU 6.2 Reference.

For detailed information on deactivation types, refer to the information about UNBIND in SNA Formats.

Table 2 shows the RPL extension fields that are returned for the ATTN exit. Coding the APPCCMD macroinstruction has information about RPL and RPL extension fields and their DSECT labels, as well as information about APPCCMD keywords.

Table 2. Fields returned in the RPL6X for the ATTN exit
RPL6X Fields ATTN Exit (FMH5) ATTN Exit (CNOS)

ATTN Exit
(LOSS)

RPL6CBID X X X
RPL6RPL X X X
RPL6MH5L X    
RPL6RMH5 X    
RPL6LU X X X
RPL6MODE X X X
RPL6CLSA   X  
RPL6AVFA   X  
RPL6PV   X  
RPL6SSID     X
RPL6SIDL     X
RPL6SNSI     X
RPL6DETP     X
RPL6DERC     X
RPL6LAST     X

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014