A display in TPXOPER still shows the virtual sessions active.
Our sample exit code in member TPXUSIS2 checks when a terminal session ends abnormally and
if either our LOSTERM exit is called or if we receive a CLEANUP Request.
CLC 0(8,R3),=CL8'LOSTERM:' LOSTERM EXIT INVOKED? BE KILLALL YES...KILL ALL APPL SESSIONS
CLC 0(15,R3),=CL15'NSEXIT: CLEANUP' NSEXIT CLEANUP INVOKED?
BE KILLALL YES...KILL ALL APPL SESSIONS
This works fine when VTAM informs us either via LOSTERM or via NSEXIT.
But If VTAM informs us via LOSTERM and NSEXIT above checks will fail and the virtual sessions will stay active.
If you encounter such a problem please check the TPXlog for following messages when you terminate the session by e.g closing the emulation without logging off before.
TPXL0050 LOSTERM EXIT ENTERED FOR SESSION ...... followed by TPXL0051 02/09/12.040 15:15:54.00 NSEXIT RU: CLEANUP ...... TPXL0151 02/09/12.040 15:15:54.00 NSEXIT RU: CLEANUP ...... EVENT IGNORED, PREVIOUS VTAM EVENT NOT COMPLETED
and a TPXL0085 message with RTNCD=14 FDBK2=60 MEANING=INVALID LU NAME FOR CLSDST OR SESSIONC
If you see these messages please change your TPXUSIST to add a third check.
CLC 0(17,R3),=CL17'ERROR1: RTFB=1460' ERROR1 EXIT INVOKED? BE KILLALL YES...KILL ALL APPL SESSIONS