What to do when your CICS program terminates abnormally
Whenever your program terminates abnormally, you can take some actions to simplify the task of finding and fixing the problem.
First, you can record as much information as possible about the circumstances under which the program terminated abnormally; and second, you can check for certain initialization and execution errors.
Recommended actions after an abnormal termination of CICS
Many places have guidelines on what you should do if your program terminates abnormally. The suggestions given here are some common guidelines:
- Document the error situation to help in investigating and correcting it. Some of the information
that can be helpful is:
- The program's PSB name
- The transaction code that the program was processing (online programs only)
- The text of the input screen being processed (online programs only)
- The call function
- The terminal ID (online programs only)
- The contents of the PCB or the DIB
- The contents of the I/O area when the problem occurred
- If a database request was executing, the SSAs or SEGMENT and WHERE options, if any, the request used
- The date and time of day
- When your program encounters an error, it can pass all the required error information to a standard error routine.
- An online program might also want to send a message to the master terminal destination (CSMT) and application terminal operator, giving information about the program's termination.
- You can send a message to the system log by issuing a
LOG
request.
Diagnosing an abnormal termination of CICS
If your program does not run correctly when you are testing it or when it is executing, you need to isolate the problem. The problem might be anything from a programming error (for example, an error in the way you coded one of your requests) to a system problem. This topic gives some guidelines about the steps that you, as the application programmer, can take when your program fails to run, terminates abnormally, or gives incorrect results.
CICS initialization errors
Before your program receives control, IMS must have correctly loaded and initialized the PSB and DBDs used by your application program. Often, when the problem is in this area, you need a system programmer or DBA (or your equivalent specialist) to fix the problem. One thing you can do is to find out if there have been any recent changes to the DBDs, PSB, and the control blocks that they generate.
CICS execution errors
If you do not have any initialization errors, check the following in your program:
- The output from the compiler. Make sure that all error messages have been resolved.
- The output from the binder:
- Are all external references resolved?
- Have all necessary modules been included?
- Was the language interface module correctly included?
- Is the correct entry point specified (for batch programs only)?
- Your JCL:
- Is the information that described the files that contain the databases correct? If not, check with your DBA.
- Have you included the DL/I parameter statement in the correct format (for batch programs only)?
- Have you included the region size parameter in the EXEC statement? Does it specify a region or partition large enough for the storage required for IMS and your program (for batch programs only)?
- Your call-level program:
- Have you declared the fields in the PCB masks correctly?
- If your program is an assembler language program, have you saved and restored registers correctly? Did you save the list of PCB addresses at entry? Does register 1 point to a parameter list of full words before issuing any DL/I calls?
- For COBOL for z/OS® and PL/I for MVS and VM, are the literals you are using for arguments in DL/I calls producing the results you expect? For example, in PL/I for MVS and VM, is the parameter count being generated as a half word instead of a fullword, and is the function code producing the required 4-byte field?
- Use the PCB as much as possible to determine what in your program is producing incorrect results.
- Your command-level program:
- Did you use the
FROM
option with yourISRT
orREPL
command? If not, data will not be transferred to the database. - Check translator messages for errors.
- Did you use the