Mainframes 360
The one stop destination for System Z professionals

Tuesday, August 4, 2009

JOB Log – How to understand and interprete JES 2 Job Log


Q. What is JOB Log? Why do we need a JOB Log? What purpose does it serve?
When you submit a Batch JOB/JCL to the MVS System, the MVS executes the Job Stream, makes the necessary resources available to the the EXEC PGM (Program), and finally tells you the result of the Job. The Result of the Batch JOB is different from the output of the Program. The result of the Batch JOB indicates – success/failure(ABEND) of the JOB.

The result of the Batch JOB is stored in SYSOUT Dataset. This file is called the Job Log. The JOB Log is stored in the queue or Spool. There would be many Job Logs for Jobs submitted by you as well as other users lying in the Queue/Spool. In the olden days, these JOB Logs waited in the printer queue to be printed. Since, there was only one Printer, not all JOB Logs could be printed at the same time. Every JOB Log/Output awaited its turn in the Queue/Spool. However, now-a-days, you can directly view the JOB Log from the Printer Queue.

Typically, most sites have SDSF(Spooler Display and Search Facility) installed, which is just a program running on top of TSO, which helps you to easily see the JOB Logs and search for JOB Logs by Job name etc. To invoke SDSF, you must type S at the command line on ISPF. The command ST shows the Jobs which have finished or Terminated.




When you submit JCL/Job Stream to the MVS O/S, you get JOB Log like the above in the Queue/Spool. MVS dumps several lines of Print Output (informational and diagnostic messages) to tell you, what it did of the Job. Here, I am going to dissect the JOB Log.

a. The first few informational messages tell you, when the JOB started on the CPU, and when it got completed. It also tells you, who started the Job, and that JES2 has converted the JCL into an internal format.
b. JOB STATISTICS tell you, how many input JCL statements were there. These are called Input Cards. Every line is treated like a Card. So, even the Instream DD * Statements are Control Cards. In the above example, JES2 read 21 Cards.
c. The JCL Listing that you’ve submitted is printed here. All the JCL Statements have been numbered.
d. COND CODE – The statement
CAA0176I – STEP01 – STEP WAS EXECUTED – COND CODE 0000
indicates, that the Job-Step STEP01 for the JOB-Name CAA0176I, was executed successfully with a condition code 0000. Condition Codes indicate the success or failure of a Batch JOB. Condition Code of 0 implies that the Job was successful. A non-zero condition code may imply warnings or severe errors. Each Program will return a condition code ranging from 0000 to 4095.
Moreover, this section also tells you about the status of all Datasets referred in the DD Cards.
e. The final informational messages in the form IEFXXXX indicate the total time the JOB took. You can find description of these informational messages in the IBM Manuals.

To many people who are thrown to work at a mainframe computer on their first job, they feel lost. Mainframe people seem to speak a completely different language and that doesn't make life easy. What's more, the books and manuals are incredibly hard to comprehend.

"What on earth is a Mainframe?" is an absolute beginner's guide to mainframe computers. We'll introduce you to the hardware and peripherals. We'll talk about the operating system, the software installed on a mainframe. We'll also talk about the different people who work on a mainframe. In a nutshell, we'll de-mystify the mainframe.

Readers based in India, can buy the e-book for Rs. 50 only or the print book. International readers based in the US and other countries can click here to purchase the e-book.