User-defined messages
The IMS Connect HWSJAVA0, HWSSMPL0, and HWSSMPL1 user message exits can return user-defined messages to the IMS Connect client when criteria that you define are met.
Any client application programs that might receive a user-defined message must be able to recognize and process user-defined messages and any associated return and reason codes. When a user-defined message is returned to the client application program, the original input message is not sent to IMS.
When a user message exit returns a user-defined message, the original input message is not passed on
Upon returning one of these user-defined messages, you can also have the user message exit request that IMS Connect either keep the socket connection open or close it, depending on your needs.
User-defined messages can be 1 to 128 characters in length. Any message longer than 128 characters is truncated.
If the message you define is longer than the client input message that is received by the user message exit routine from the IMS Connect, increase the buffer size used by the exit routine by specifying the needed extra bytes in the EXPINI_BUFINC field returned by the exit.
To request that IMS Connect keep a socket connection open after returning a user defined message, the exit routine must set EXPREA_RETCODE to 20 (X'14'). To terminate a socket connection, the exit routine must set EXPREA_RETCODE to 4 (X'04'). Because other factors can cause IMS Connect to terminate a connection, specifying 20 in EXPREA_RETCODE does not guarantee that the socket connection will remain open.
For HWSJAVA0, you can return user-defined message text or only a return code and reason code. To return user-defined message text, the HWSJAVA0 user message exit must set OMUSER_RETCODE to 48 (X'30') and OMUSR_RSNCODE to ICONSUCC. Any other combination of values for OMUSER_RETCODE and OMUSER_RSNCODE returns a return and reason code without user-defined message text.
For HWSSMPL0 and HWSSMPL1, you return user-defined message text by placing the message text in the output message buffer.