Skip to content
JCL & batch

Return code

A number a program leaves behind saying how it went. Zero for clean, higher numbers for warnings and failures.

Also written RC, condition code, completion code

Every step in a job ends with a return code, and every batch programmer learns to read them before anything else. It is the system's summary of how the step went.

The convention is consistent. Zero means it worked. Four means it worked with warnings worth looking at. Eight means something went wrong. Twelve and sixteen mean serious errors. A program can set its own values, and utilities and compilers follow the scale closely.

The code is what makes conditional batch possible. Later steps can test what earlier ones returned and decide whether to run, so a job can stop cleanly instead of processing bad data.

Return codes are also the first thing you look at in SDSF after a job runs. A column of zeros means the run was clean. Anything else tells you which step to open and read.

They are distinct from abends. A return code means the program finished and reported a result; an abend means it stopped abnormally without finishing at all.

Browse all 115 terms

Learn this properly.

Use Return code for real in Mainframe101, in your browser, with Zed beside you. Join the waitlist.

Early access and updates. No spam, unsubscribe any time.