1.

What are the different stages of processing a job?

Answer»

JCL is used for processing work by the z/OS system by defining which PROGRAM needs to be executed, what resources need to be allocated, etc. The description of work specified is called a job. z/OS system makes use of JES (Job Entry SUBSYSTEM) that receives jobs into the OS, schedules them and processes them, and controls their output.

Following are the phases of job processing:

  • Input Phase: This is a phase for inputting the jobs utilizing using input devices like remote terminals, card readers, job entry networks, etc. We can also use internal readers that can be used by other programs for submitting the job, providing COMMANDS and control statements to JES2.
    • Whenever JES2 reads the input stream, a job identifier is assigned to each job and places every job’s JCL, control statements, SYSIN data etc onto DASD datasets which are called spool data sets. The spool has direct access to the datasets and provides the capability to perform simultaneous job processing and also provides a temporary storage area for incomplete jobs. JES2, later on, selects jobs from this spool and processes them.
  • Conversion Phase: This phase involves the usage of a converter program for analyzing every JCL statement and does the task of checking program syntax.
    • JES can also determine if JCL has any procedure calls. If there are any, then the convertor does the task of taking the job’s JCL, merges it with JCL by making use of the procedural library like SYS1.PROCLIB and converts composite JCL to internal text which is then stored in a spool.
    • During this conversion, if any errors are identified, then JES2 sends out appropriate error messages and queues them for output processing.
    • In case there are no errors in the job, then the job is queued for further processing BASED on the PRIORITY of its class.
  • Execution Phase: In this phase, the initiators are started either automatically or employing an operator at the time of system initialization. Once the initiator is ready, a job is requested from JES2 for execution.
    • JES2 selects the job and assigns it to the initiator based on the priority assigned for the order of execution.
    • The initiator invokes the interpreter for building the control blocks from the internal text created in the earlier step. It also allocates resources that are required for running the job.
    • Once sufficient resources are allocated, the program starts its execution as requested in the JCL EXEC statement.
  • Output Phase: Post the execution of the program, output processing is done for sending out system messages to the user. The job’s output characteristics are analyzed by JES2 based on the requirements and then queues for printing or punch processing. This queue is called an output queue which can contain records that require local or remote processing.
    • Once the output processing is complete, the jobs are sent to the purge queue and made ready for the purge phase.
  • Purge Phase: Post-processing of the job, JES2 picks it from the purge queue and releases the resources and spool space of the job to make it available for upcoming jobs. The purge indicator message will then be sent to the OS from the system.


Discussion

No Comment Found