Topic
  • No replies
Maksymas
Maksymas
9 Posts

Pinned topic Usrhdlr usage

‏2010-11-02T14:42:30Z |
Dear All,

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?

Please help...

Thanks,
Maksymas.
Updated on 2010-11-10T15:55:56Z at 2010-11-10T15:55:56Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    196 Posts

    Re: Usrhdlr usage

    ‏2010-11-10T15:55:56Z  
    I'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/4.1.4.2?SHELF=EZ2ZBK0K.bks&DT=20100630130630