|
Hi, Dave:
You could call your version of the LOGOFF command SIGNOFF, and change
the command processing program as follows:
PGM PARM(&LIST)
DCL VAR(&LIST) TYPE(*CHAR) LEN(7)
DCL VAR(&SYSNAME) TYPE(*CHAR) LEN(8)
/* attempt to end an SNA pass-through session ... */
ENDPASTHR LOG(&LIST)
MONMSG MSGID(CPF0000) EXEC(DO)
RCVMSG PGMQ(*SAME *) MSGTYPE(*EXCP) MSGKEY(*NONE) +
WAIT(0) RMV(*YES)
ENDDO
/* if that fails, sign off, and end TCP connection ... */
RTVNETA SYSNAME(&SYSNAME)
IF (&SYSNAME *EQ 'S103X29M') +
QSYS/SIGNOFF LOG(&LIST) ENDCNN(*NO)
ELSE +
QSYS/SIGNOFF LOG(&LIST) ENDCNN(*YES)
ENDPGM
The idea here is to retrieve the system name, and if it is the name of
your "normal" primary system, issue the "real" SIGNOFF command with
ENDCNN(*NO), otherwise (you must have done a telnet to some other
system, so) issue the "real" SIGNOFF with ENDCNN(*YES).
Would that work better for you?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.