CICS abend

APCT: Program not found in CICS

An APCT abend means CICS couldn't get the program it needed for a transaction, because the program isn't defined, is disabled, or can't be loaded from the program libraries. It is usually a deployment or definition problem, not a coding error.

Also written as APCT abend, CICS APCT, abend APCT, APCT program not found, CICS program not found abend.

What it means

APCT means CICS needed a program and couldn't get it. Most often it's the first program of a transaction. The user enters a transaction ID, and CICS looks up the program named in the TRANSACTION definition. If that program isn't defined, is disabled, or isn't in any library CICS searches, the task can't run and CICS ends it with APCT.

APCT also appears when BMS can't load the map set needed for a SEND MAP or RECEIVE MAP, because map sets are loaded the same way as programs. If the map set loads but doesn't contain the map the program named, the abend is ABM0 instead. When a running program asks for another program with LINK or XCTL and it isn't available, the result is different. The program gets the PGMIDERR condition, and if it doesn't handle it, the abend is AEI0.

Common causes

  • The load module isn't in any library CICS searches, either the DFHRPL concatenation or a dynamic LIBRARY resource. This is common right after a release, when a program was deployed to one region and missed in another.
  • There's no PROGRAM definition installed for the program, and program autoinstall is off.
  • The PROGRAM resource is disabled, for example by a CEMT SET PROGRAM DISABLED during a change that nobody reversed.
  • The TRANSACTION definition names the wrong program, often a typo or an old name left behind after a rename.
  • The load module exists but can't be loaded, for example because a failed link-edit left it marked not executable.
  • The map set used by SEND MAP or RECEIVE MAP is missing from the libraries or isn't defined.

How to find the problem

  1. Run CEMT INQUIRE TRANSACTION(tranid) and check the program name it shows against what you expect.
  2. Run CEMT INQUIRE PROGRAM(name). It shows whether the program is defined, whether it's enabled, and whether CICS has loaded a copy. On current releases it can also show the library the program was loaded from.
  3. Check the libraries. Look for the member in each data set of the region's DFHRPL concatenation, or in the data sets of its LIBRARY resources, and check the link-edit output for errors.
  4. Look in the region's log around the time of the failure for messages about a program load or autoinstall failing.
  5. If the abend happened on a SEND MAP or RECEIVE MAP, check the map set the same way. CEMT INQUIRE PROGRAM(name) also lists map sets, and its PROGTYPE field shows MAPSET for them. Then search the libraries for the map set's load module.

How to fix it

  • Copy or promote the load module into a library CICS searches. Then use CEMT SET PROGRAM(name) NEWCOPY, or PHASEIN if the program is in use, so CICS picks up the new copy.
  • Install a PROGRAM definition (or the map set definition) in the region, and add its CSD group to the region's startup list so it's there after the next restart. Sites that use program autoinstall can rely on that instead.
  • Enable a disabled program with CEMT SET PROGRAM(name) ENABLED.
  • Correct the PROGRAM attribute on the TRANSACTION definition if it names the wrong program.
  • APCT is usually fixed by the CICS systems programmers or the change team, because it's about definitions and libraries. The application team fixes it when its own deployment package left something out.

What it looks like

DFHAC2206 08:05:31 CICSPRD1 Transaction CLM1 failed with abend APCT. Updates to local recoverable resources backed out.

Questions

What is the difference between APCT and AEI0?

APCT means CICS couldn't get a program it needed itself, usually the first program of a transaction. AEI0 means a running program asked for another program with LINK, XCTL or LOAD, got PGMIDERR and didn't handle it.

Why does the transaction work in test but get APCT in production?

The program, its definition or its map set reached the test region but not production. Compare the PROGRAM and TRANSACTION definitions and the program libraries in both regions.