4.7.3 JSMPXYEXT
The JSMPROXY program calls CL program JSMPXYEXT when the following life cycle events occur:
ENTRY |
Program starts. |
EXIT |
Program finishes successfully. |
ERRnnnn |
where nnnn is a 4 digit number starting from 2000. |
The source code for this exit program is stored in QCLSRC in the JSM library.
/* JSMPROXY EXIT PROGRAM */
PGM PARM(&EVENT &SERVICE &SERVERHOST &REMOTEUSER &REMOTEADDR +
&DIRECTHOST &HOST &PORT &CONTINUE &MESSAGE)
DCL VAR(&EVENT) TYPE(*CHAR) LEN(10)
DCL VAR(&SERVICE) TYPE(*CHAR) LEN(30)
DCL VAR(&SERVERHOST) TYPE(*CHAR) LEN(80)
DCL VAR(&REMOTEUSER) TYPE(*CHAR) LEN(30)
DCL VAR(&REMOTEADDR) TYPE(*CHAR) LEN(45)
DCL VAR(&DIRECTHOST) TYPE(*CHAR) LEN(80)
DCL VAR(&HOST) TYPE(*CHAR) LEN(80)
DCL VAR(&PORT) TYPE(*CHAR) LEN(5)
DCL VAR(&CONTINUE) TYPE(*CHAR) LEN(1)
DCL VAR(&MESSAGE) TYPE(*CHAR) LEN(256)
MONMSG MSGID(CPF0000)
IF COND(%SUBSTRING(&EVENT 1 3) *EQ 'ERR') THEN(DO)
/* LOG ERROR EVENT */
SNDPGMMSG MSG('------- JSMPROXY ERROR -------')
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA(&EVENT)
SNDPGMMSG MSGID(&EVENT) MSGF(JSMMSGF)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA(&SERVICE)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA(&SERVERHOST)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA(&REMOTEUSER)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA(&REMOTEADDR)
SNDPGMMSG MSG('------------------------------')
GOTO END
ENDDO
IF COND(&EVENT *EQ 'ENTRY') THEN(DO)
/* DEFAULT VALUE FOR CONTINUE IS 'Y' */
/* CHGVAR VAR(&CONTINUE) VALUE('N') */
/* CHGVAR VAR(&MESSAGE) VALUE('I do not know you') */
GOTO END
ENDDO
IF COND(&EVENT *EQ 'EXIT') THEN(DO)
GOTO END
ENDDO
END: ENDPGM