There is a field in the RPL extension called RPL6LAST. This
field is completed by APPC/VTAM when it schedules the ATTN(LOSS) exit.
RPL6LAST is a 2–bit field that indicates whether the session being
terminated is:
- Not the last session to this LU for this particular modename.
(Other sessions remain active for this modename.)
- The last session to this LU for this particular modename.
- The last session to this LU for all non-control mode modenames.
(SNASVCMG and CPSVCMG are control modes).
- The last session to this LU for all modenames.
The safest way to terminate an application is to perform
the following tasks:
- Issue an APPCCMD (DEFINE) to set session limits to 0 for all modes.
This stops a CNOS from the partner from starting sessions successfully.
- Issue an APPCCMD (CNOS, ALL) to set session limits to 0 for all
non-control mode modenames.
- When RPL6LAST indicates all non-control mode sessions are ended,
issue an APPCCMD (CNOS) to set SNASVCMG session limits to 0.
- Repeat these steps for all partner LUs.
- When RPL6LAST indicates all sessions are ended for all LUs, CLOSE
the ACB.