CPF1164: Job ended
CPF1164 is the message IBM i logs when a job ends. It includes an end code. End code 0 means the job completed normally, and higher codes, such as 20, 30 or 50, mean it ended early or abnormally.
Other names for this code
Also written as MSGCPF1164, CPF1164 job ended, CPF1164 end code, job ended end code 30, CPF1164 end code 20, iSeries CPF1164.
What it means
CPF1164 is written at the end of every job's log and to the history log, QHST. It names the job (number/
- 0. The job completed normally.
- 10. Completed normally during a controlled end of the job or its subsystem.
- 20. The job exceeded its end severity (the ENDSEV job attribute).
- 30. The job ended abnormally.
- 40. The job ended before it became active.
- 50. The job ended while it was active.
- 60. The subsystem ended abnormally while the job was active.
- 70. The system ended abnormally while the job was active.
- 80. The job was ended with ENDJOBABN.
- 90. The job was forced to end after the ENDJOBABN time limit.
After an abnormal system end, the system may not manage to log CPF1164 at the time. IBM notes that it is then posted during the next IPL.
Common causes
- Every job that ends logs CPF1164, including sign-offs, so on its own it isn't an error.
- End code 20 or 30 usually means a program hit an error nothing handled, such as a function check, and the job ended.
- End code 50 often means the job was ended from outside while running, for example with ENDJOB.
- End codes 60 and 70 mean the subsystem or the whole system went down underneath the job.
- End codes 80 and 90 come from ENDJOBABN, used when a job won't end normally.
How to find the problem
- Look at the last message of the job log, from
DSPJOBLOGor the QPJOBLOG spooled file (WRKJOBoption 4). Press F1 on CPF1164 to read the end code. - Search QHST with
DSPLOG LOG(QHST) MSGID(CPF1164), adding a date range orJOB(name)to narrow it. - For a non-zero end code, read the job log upwards from CPF1164. The first escape or CPF9999 function check is usually the cause.
- For the submitter's view, check the user's message queue with
DSPMSGfor CPF1241 (completed normally) or CPF1240 (ended abnormally).
How to fix it
- For end code 0 or 10, nothing is wrong.
- For 20 or 30, fix the error shown earlier in the job log, then rerun the job.
- For 50, find out who or what ended the job. The job log and QHST usually record the end request and the user who made it.
- For 60 or 70, investigate the subsystem or system failure first, then rerun affected jobs.
- If job logs come out too short to help, raise the logging level. Use
CHGJOB LOG(4 00 *SECLVL)for a running job, orCHGJOBDwith the same LOG value on the job description so future jobs get it.
IBM documentation
IBM Display Message Descriptions (DSPMSGD). Use the documentation for your installed release.
This link opens the relevant IBM reference library or lookup instructions. Match the complete code and your installed product release; it is not a code-specific review.
Read the installed message description:
DSPMSGD MSGID(CPF1164) MSGF(QSYS/QCPFMSG)
Also inspect the full job log and second-level message text, including substitution values.
Related codes
Questions
What does CPF1164 end code 30 mean?
The job ended abnormally. Read the job log just before CPF1164 for the error that caused it, usually an unhandled escape message or a function check.
Is CPF1164 an error message?
No. Every job logs it when it ends. Only the end code tells you whether something went wrong.
Where can I see CPF1164 for a job that has already gone?
In the history log. DSPLOG LOG(QHST) MSGID(CPF1164) or the QSYS2.HISTORY_LOG_INFO table function keep it after the job log has been deleted.