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.
Related terms
- Job stepOne program execution within a job. A job is simply a sequence of steps that run in order.
- COND parameterThe older way of telling a job step whether to run, based on the return codes of earlier steps.
- AbendAn abnormal end: a program stopping in an uncontrolled way rather than finishing and reporting a result.
- SDSFThe tool for looking at what jobs are running, what has finished, and what output they produced.
- JobA unit of batch work submitted to the system, made up of one or more steps that run in order.