System abend

S806: Program not found

An S806 abend means z/OS couldn't find the load module a job asked for in any library it searched, including STEPLIB or JOBLIB, the link pack area and the link list. Message CSV003I names the missing module.

Also written as 806, S806-04, 806-04, abend 806, system abend 806, ABEND=S806, module not found.

What it means

When a job runs a program, through EXEC PGM=, a dynamic CALL, LINK, XCTL or LOAD, z/OS looks for the load module in a fixed order. It checks modules already loaded for the job, then the STEPLIB or JOBLIB libraries, then the link pack area (LPA), then the libraries in the system link list. If no library has a member with that name, the system ends the step with system completion code 806.

Two messages come with it. CSV003I REQUESTED MODULE name NOT FOUND gives the exact module name, and CSV028I gives the abend code, reason, job and step. The name in CSV003I is the most useful clue in the job log.

The reason code is almost always 04, which means the module wasn't in any library searched. Other reason codes are rare. They point to something other than a missing member, such as a problem reading a library, and are worth looking up for your release.

Common causes

  • The program name is misspelled, in PGM= or in the CALL statement, or the program was renamed.
  • The load library that holds the program isn't in STEPLIB or JOBLIB for that step.
  • A STEPLIB DD on the step replaces JOBLIB for that step. If the STEPLIB lists only one library, every library in JOBLIB disappears from the search.
  • The program was never compiled and linked into that library, or a promotion from test to production missed it.
  • A dynamic CALL names a subprogram that isn't in any library searched. Language Environment usually reports this with message CEE3501S as well.
  • The program calls a product such as Db2, MQ or IMS, and that product's load library isn't in the concatenation.
  • The module was added to a link list library, but the system hasn't refreshed its cached directory (LLA), so it still can't see the new member.

How to find the problem

  1. Read the name in CSV003I. Check that it's the name you expected, letter for letter.
  2. Look at the JCL listing for the step and note every library in STEPLIB, or in JOBLIB if there's no STEPLIB. The IEF237I and IEF285I messages in the job log confirm which data sets the step actually used.
  3. Browse each of those libraries in ISPF and look for the member. In TSO, the ISRDDN utility shows your own allocations and its MEMBER command searches them for a name.
  4. If the program should come from the link list, ask your system programmer to check it with the operator command D PROG,LNKLST.
  5. If the missing name is a subprogram, check the calling program's CALL statement and whether it calls by a literal name or by a variable.

How to fix it

  • Correct the program name in the JCL or the CALL statement.
  • Add the right load library to STEPLIB or JOBLIB. If you add a STEPLIB to one step, include every library that step needs, since it replaces JOBLIB.
  • Compile and link the program into the library the job uses, or finish the promotion that missed it.
  • Add the product load libraries the program needs. Your Db2, MQ or IMS support team can tell you which ones.
  • For a link list library, ask your system programmer to refresh LLA so the new member is seen.

What it looks like

CSV003I REQUESTED MODULE PAYCALC2 NOT FOUND
CSV028I ABEND806-04  JOBNAME=PAYRUN01  STEPNAME=STEP020
IEA995I SYMPTOM DUMP OUTPUT
  SYSTEM COMPLETION CODE=806  REASON CODE=00000004
IEF450I PAYRUN01 STEP020 - ABEND=S806 U0000 REASON=00000004

Questions

The module is in the library. Why do I still get S806?

The job is probably searching different libraries than you think. A STEPLIB on the step hides JOBLIB, the job may point at a test library instead of production, or a link list library needs an LLA refresh before new members are seen.

What does S806-04 mean?

Reason code 04 means the module wasn't found in any library the system searched. It's by far the most common S806.

Is S806 the same as SQLCODE -805?

No. S806 means z/OS couldn't find a load module. SQLCODE -805 means Db2 couldn't find the package for a program in the plan, which is a bind problem, not a library problem.