z/OS message

IEF142I: Step was executed, condition code

IEF142I means a job step ran to the end without abending. The COND CODE at the end of the line is the return code the program left for the system, such as 0000 when all went well or 0008 when the program reported an error.

Other names for this code

Also written as IEF142, STEP WAS EXECUTED - COND CODE, IEF142I STEP WAS EXECUTED, IEF142I COND CODE 0004, step was executed cond code.

What it means

z/OS writes IEF142I to the job's system messages when a step ends normally. Normally means the program gave control back to the system instead of abending. The line names the job, the procedure step if the step runs inside a procedure, and the step. Then it gives the condition code.

The condition code is the step's return code. When a program ends, it leaves a number in general register 15, and z/OS records that number for the step. IEF142I prints it as four decimal digits, so COND CODE 0008 means a return code of 8. The system doesn't judge it. Each program decides what its codes mean, though most IBM utilities and compilers follow one pattern. 0 is success, 4 is a warning, 8 is an error, and 12 or 16 is a severe error.

Two details catch people out. If the program never set register 15 before it ended, the code is whatever the register happened to hold, and it means nothing. Also, a step return code can only run from 0 to 4095. A larger value keeps only its remainder after division by 4096. A z/OS FTP step whose own return code is 20550 shows COND CODE 0070, because 20550 is five times 4096 plus 70.

The code also stays as the program set it. If the system later fails to delete or catalog a data set at the end of the step, IEF142I still shows the program's code. Those failures have their own messages, such as IEF283I for a data set that wasn't deleted and IEF287I for one that wasn't cataloged.

IEF142I is informational. It matters when a later step tests the code with COND or IF, or when a scheduler treats a code above some limit as a failure.

Common causes

  • The program found a problem it could handle and reported it with a non-zero code, such as 4 for a warning or 8 for an error. Its own messages in SYSPRINT or SYSOUT say what it found.
  • A utility or compiler rejected a control statement or some of its input. IDCAMS, IEBGENER, DFSORT and the compilers report problems this way.
  • A COBOL or PL/I program set its return code on purpose, for example by moving a value to the COBOL RETURN-CODE special register, to tell a later step or the scheduler that something needs attention.
  • A server or product region couldn't start and ended itself with a code such as 16 instead of abending.
  • A product set a return code above 4095, so the number in IEF142I is the remainder after dividing by 4096 and doesn't match the product's own messages.

How to find the problem

  1. Open the job in SDSF from the ST or H panel and type ? next to it. IEF142I is in JESYSMSG. For each step it comes after the allocation messages (IEF236I and IEF237I) and before the data set disposition messages (IEF285I) and the step timing lines (IEF373I and IEF374I).
  2. The SDSF status panel also shows the highest code for the whole job in the MAX-RC column, such as CC 0008. Use the IEF142I lines to see which step produced it.
  3. Open that step's own output, usually SYSPRINT or SYSOUT. The program's messages explain why it set the code.
  4. If the code doesn't match anything in the product's messages, check whether the product can set codes above 4095. Divide its code by 4096 and compare the remainder with IEF142I.

How to fix it

  • Fix what the program's messages report, such as a bad control statement or a rejected input record. Then rerun from that step with RESTART=STEP020 on the JOB statement if the earlier steps don't need to run again.
  • If a code is expected and harmless, test for it exactly instead of ignoring every code. // IF (STEP010.RC LE 4) THEN lets the next steps run after a warning, while an 8 still stops them.
  • If later steps were skipped because of this code, check their COND parameters. COND=(4,LT) bypasses a step when 4 is less than an earlier return code, which reads backwards to most people.
  • In your own programs, set the return code at every exit, so the condition code always means something.

What it looks like

IEF236I ALLOC. FOR PAYRUN01 STEP010
IEF237I JES2 ALLOCATED TO SYSIN
IEF142I PAYRUN01 STEP010 - STEP WAS EXECUTED - COND CODE 0004

IBM documentation

IBM documentation: IEF142I. Use the documentation for your installed release.

Report a correction to WND Software.

Questions

Does IEF142I mean my step worked?

It means the step ended without an abend. Whether the work was right depends on the condition code and on what the program says in its own output.

Why is the COND CODE different from the return code in the product's messages?

A step return code can only be 0 to 4095, so z/OS keeps only the remainder after dividing a larger value by 4096. An FTP return code of 20550 shows up as COND CODE 0070.

Why is there no IEF142I for one of my steps?

Because that step didn't end normally or didn't run. An abended step gets IEF450I with the abend code, and a step that never started gets IEF272I STEP WAS NOT EXECUTED or a message saying it was bypassed.