Menu
CoddyTech

S806 and U4038

Part of the Batch Jobs with JCL section of Coddy's COBOL Programming journey. Lesson 13 of 19.

S806 means the program named in PGM= was not found. The log says which name it looked for:

CSV003I REQUESTED MODULE SUMSALE NOT FOUND
IEF450I SALESN LOAD - ABEND=S806 U0000 REASON=00000000

On z/OS the cause is a misspelled name or a library the step does not search, often fixed with a STEPLIB DD naming the library. Here the library is the lesson's files, so check PGM= against the .cob file names.

A program that opens a file with no DD statement of that name fails. With no FILE STATUS to check, Language Environment ends the step with user code U4038:

IEF450I SALESW LOAD - ABEND=S000 U4038 REASON=00000000
IEF472I SALESW LOAD - COMPLETION CODE - SYSTEM=000 USER=4038

The SYSOUT gives the file status, 35 (the file is not there), and the DD name in quotes. On z/OS the message is IBM's IGZ0035S; here it is GnuCOBOL's:

libcob: SUMSALES.cob:19: error: file does not exist (status = 35) for file SALES-FILE ('SALESIN') on OPEN

Match the DD name to ASSIGN TO. S013 is a different failure, an OPEN that data management rejects (such as a record length that conflicts with the data set), and this course does not produce it.

challenge icon

Challenge

Easy

The job ABENDs S806. Read the CSV003I line, then fix the program name on the EXEC so it runs SUMSALES and prints SALES TOTAL   2,625.

Try it yourself

//SALESN   JOB (ACCT),'CODDY',CLASS=A,MSGCLASS=X
//LOAD     EXEC PGM=SUMSALE
//SALESIN  DD DSN=CODDY.SALES.NORTH,DISP=SHR
//SYSOUT   DD SYSOUT=*

All lessons in Batch Jobs with JCL

Practice on your own: Online COBOL compiler