Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 1: Abend Codes


S806- Load Module Not Found

S806 abends the step when the system cannot find the program load module in the library search order.

What it means

  • The step was never executed because the program named on the EXEC statement could not be located in any library.
  • S806 is a load/attach problem, not a logic bug in your program - the program never got control.

Common causes

  • Misspelled program name in the PGM parameter of the EXEC statement.
  • The program was compiled but never link-edited, so no load module exists in the load library.
  • The STEPLIB or JOBLIB DD points to the wrong library or the wrong dataset name.
  • The load module sits in a private library that is not in the search order of this step.

How to find it

  • Look for the IEF212I message in the job log - it names the module that could not be found.
  • Check the reason code on S806 (reason 04 means module not found in LPA, JPA, STEPLIB, JOBLIB or linklist).
  • Compare the PGM name letter by letter with the member name in the load library.

How to fix it

  • Verify the spelling of the program name on the EXEC PGM= parameter.
  • Check that the STEPLIB (or JOBLIB) DD points to the load library that really holds the module.
  • Confirm the linkedit step ran successfully and created the load module.

Example

  • A step telling the system where the load module lives:-
    //S806JOB JOB (ACCT),'LOAD MODULE TEST',CLASS=A,MSGCLASS=X //STEP1 EXEC PGM=MYPROG //STEPLIB DD DSN=MY.LOADLIB,DISP=SHR //SYSOUT DD SYSOUT=*
  • If MYPROG is not a member of MY.LOADLIB, this step abends with S806 and IEF212I names MYPROG.





© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant