Search code examples
db2mainframecics

DSNACICS stored procedure fails for all cics transactions


I am attempting to invoke DSNACICS stored procedure for one of the mainframe CICS transactions.

This fails with:

DSNA305I THE CICS EXCI DPL_REQUEST     REQUEST FAILED.  CICS RESPONSE CODE = X'0012' CICS REASON CODE = X'00000422' 

Since this one failed, I tried with some more transactions, but all of them fail with the same problem.

I have been looking in IBM Redbooks to see what could be the problem, but could not find much information. Any pointers would help.

Is there any mandatory configuration before I try to invoke a transaction using DSNACICS?


Solution

  • The detail you need to use is in that error message. Let's take a look at it:

    DSNA305I THE CICS EXCI DPL_REQUEST     REQUEST FAILED.
    

    So that's the command that was running. Then the cause can be narrowed down with the response and reason codes:

    CICS RESPONSE CODE = X'0012'
    CICS REASON CODE = X'00000422'
    

    DSNACICS uses CICS' EXCI interface to talk to CICS. The EXCI call response code values show how to interpret the response code.

    12: USER_ERROR

    The EXCI CALL command failed. This class of error means there is an error either in the client program, or in the CICS server program, or in the CICS server region. An example of an error in the CICS server system would be a failed security check, or an abend of the CICS server program, in which case the abend code is set in the abend code field of dpl_retarea. Each reason code value for a response of USER_ERROR explains whether the command can be reissued directly, or whether the pipe being used has to be closed and reopened first.

    OK, user error... but specifically what? If you look at the Response and reason codes returned on EXCI calls, it shows the following for the 422 reason code:

    Explanation

    While processing a DPL request, the CICS® server application program abended without handling the error.

    System Action

    The server application program is abended and backout out. The abend code is returned in the abend code field of the EXCI return area.

    User Response

    Determine why the server program abended and fix the problem.

    So it looks like you need to look into the CICS region to work out why this program is abending. If you look at the abend code that the CICS region used, that can tell you more about what went wrong in CICS. I've not used DSNACICS so I'm not sure if that information is directly accessible, but if you look at the DSNACICS documentation you see:

    Debugging

    If you receive errors when you call DSNACICS, ask your system administrator to add a DSNDUMP DD statement in the startup procedure for the address space in which DSNACICS runs. The DSNDUMP DD statement causes Db2 to generate an SVC dump whenever DSNACICS issues an error message.