I am writing a USRHDLR for my online C program to register and unregister the Handler.
I have few question on which I need a help.
1) USRHDLR function has four parameters
void usrhdlr(_FEEDBACK *, _INT4 *, _INT4 *, _FEEDBACK *);
How does this four parameters being picked by LE specifically? or is system defined?
can we add another parameter?
2) Who/how/when this function is called?
3)If we do a EXEC CICS RETURN/EXEC CICS ABEND - will this be trapped by register handlers?
This topic has been locked.
1 reply Latest Post - 2010-11-10T15:55:56Z by SystemAdmin
Pinned topic Usrhdlr usage
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-11-10T15:55:56Z at 2010-11-10T15:55:56Z by SystemAdmin
SystemAdmin 110000D4XK196 PostsACCEPTED ANSWER
Re: Usrhdlr usage2010-11-10T15:55:56Z in response to MaksymasI'm posting this reply on behave of Tom Petrolino:
Most of the questions are answered in documentation contained in the LE Programming Guide. There's a chapter on LE Condition Handling: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea21b0/3.4?SHELF=EZ2ZBK0K.bks&DT=20100630130630
and a chapter on Coding a user-written Condition Handler: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea21b0/3.6?SHELF=EZ2ZBK0K.bks&DT=20100630130630
In response to the specific questions:
USRHDLR function has four parameters void usrhdlr(_FEEDBACK *, _INT4 *, _INT4 *, _FEEDBACK *);
How does this four parameters being picked by LE specifically? or is system defined? can we add another parameter?
The parameters to the user handler are described here: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea21b0/3.6.3?SHELF=EZ2ZBK0K.bks&DT=20100630130630&CASE=
You cannot add other parameters. If you used CEEHDLR to register the handler, then the second parameter, the "token", can be used to pass application-specific data to the handler.
Who/how/when this function is called?
There is a section in the LE Programming Guide called "Invoking Condition Handlers" that describes this: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea21b0/3.4.5?SHELF=EZ2ZBK0K.bks&DT=20100630130630&CASE=
If we do a EXEC CICS RETURN/EXEC CICS ABEND - will this be trapped by register handlers?
A CICS RETURN is a "normal" return, so condition handlers should not get control.
For CICS ABEND, it depends on whether a CICS HANDLE ABEND is active: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea21b0/188.8.131.52?SHELF=EZ2ZBK0K.bks&DT=20100630130630