Abend
A step that ends abnormally, because something went wrong that the program or the system could not carry on past.
Also written abnormal end, ABEND, crash
Why it matters. An abend means the work stopped partway. The first thing you do on a failed job is check whether it abended or ended with a return code.
Syntax
IEF450I jobname stepname - ABEND=Sxxx Uyyyy REASON=zzzzzzzz IEF472I jobname stepname - COMPLETION CODE - SYSTEM=xxx USER=yyyy REASON=zzzzzzzz
- Sxxx
- A system abend. The code is in hex, such as S0C7 or S806.
- Uyyyy
- A user abend, set by a program. The number is in decimal.
- REASON
- A reason code that narrows down the cause.
- COND=EVEN / ONLY
- Let a step run, or run only, after an abend.
- IF ABEND
- The newer way to run recovery steps.
Try it SUBMIT
- 1
Send the job RPTRUN in your DEV JCL library to run. Read the last line.
SUBMIT 'ZB0001.DEV.JCL(RPTRUN)' - 2
Read the job log, JESMSGLG. Find the line above the abend that says why.
OUTPUT RPTRUN JESMSGLG - 3
Now submit a job that runs clean: CUSTCHK.
SUBMIT 'ZB0001.DEV.JCL(CUSTCHK)'
Remember
- An abend is a stop in the middle. A return code is a report at the end.
- Every abend has a code. S806 is a system code, in hex. U0123 is a user code, in decimal.
- Read the message above the abend. It says what went wrong.
The usual mistake
Looking for the return code of an abended step
The step never finished, so it has no return code. JES shows ABEND=S806 in its place.
Read the abend code, then the messages above it in the job log
On real z/OS
MF/OS simulates only a few abends: S806, S0C7, S013 on a missing member, and a few others. Real z/OS has hundreds, and many come with a dump written to SYSUDUMP or SYSMDUMP. MF/OS writes no dump.
Where can I practise Abend?
Right here, at ZedBank. You take a junior job at a simulated bank and use Abend in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- Return codeA number a program leaves behind saying how it went. Zero for clean, higher numbers for warnings and failures.
- Job stepOne program execution within a job. A job is simply a sequence of steps that run in order.
- SDSFThe tool for looking at what jobs are running, what has finished, and what output they produced.
- SYSOUTOutput sent to the spool rather than to a dataset, where you can read it after the job finishes.
- Production supportKeeping live systems running: diagnosing failures, fixing what broke, and getting the service back.