Mainframe: How to Debug CICS Abend Code

When CICS encounters an error it can’t recover from, it ends in an abnormal termination, or abend.

There are many utilities we can use to trace out CICS abends.  Usually, in CICS, when running a transaction, due to logic problem in a program, the transaction might abends.

Where you you can see abends in CICS

  • One way is an abend code you can see on the terminal
  • Second way is while running a transaction in CICS, all the execution log will be routed to either submitting a job in spool or writes to a VSAM file with all transaction/abend messages

How to investigate error message(Abend) in CICS

When a CICS program terminates abnormally, an abnormal termination message (or just abend message) like this is sent to the terminal:

This message indicates that the program DFXXP00A started by transaction DFXX at terminal H400 ended with an abend code of ASRA. Almost always, it’s the abend code that gives you the information you need to begin debugging your program. Fortunately, only a few of the over 300 possible abend codes occur regularly.

And most of those fall into two categories:

  • exceptional condition abends
  • program check abends.

Exceptional condition abends

As you know, when a CICS command encounters an unusual situation, it generates an exceptional condition.

For example, if a READ command tries to read a record that doesn’t exist, the NOTFND condition is raised. If an exceptional condition occurs when you don’t code the RESP option for the command, the task is abnormally terminated. Then, CICS displays an abend code that identifies the exceptional condition that caused the abend.

Program Check abends

When a program tries to perform an operation that isn’t allowed by the hardware, a program check occurs. Ex:-ASRA

Also read

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.