Module 1: Abend Codes
S722- Sysout Limit Exceeded
S722 means your job wrote more SYSOUT output lines than the installation allows, so the system killed it before it finished.
What it means
- S722 is a system abend issued when a job step exceeds the output line limit.
- Every site sets a maximum number of SYSOUT lines per job; go past it and the job is abended.
- The job log shows IEC142I S722 (or S722 with reason code) in the JES messages.
Common causes
- A program is writing far too much output - the classic culprit is a DISPLAY inside a loop that prints on every iteration.
- Debug DISPLAY statements left in production code.
- A report program processing a huge file with no page limits.
- The installation limit is simply low and the job's normal output exceeds it.
How to find it
- Look for S722 in the job log (JES2/JES3 messages).
- Check which DD name was writing heavily when the abend hit.
- Review the program for DISPLAY or WRITE statements inside loops.
How to fix it
- Reduce the program output - remove debug DISPLAYs and avoid printing every loop iteration.
- If the output is genuinely needed, ask your operations team to raise the output limit for the job.
- Consider writing large reports to a dataset instead of SYSOUT.
Example
- The SYSOUT DD in your JCL looks like this:-
//SYSOUT DD SYSOUT=*
- The typical culprit is a DISPLAY inside a loop, which floods SYSOUT:-
PERFORM 100000 TIMES DISPLAY 'PROCESSING RECORD: ' WS-REC-COUNT END-PERFORM.
- Fix: print only a summary after the loop, not every record:-
PERFORM 100000 TIMES ADD 1 TO WS-REC-COUNT END-PERFORM. DISPLAY 'TOTAL RECORDS PROCESSED: ' WS-REC-COUNT.
