JES2 Process
The JES2 process is as follows
- Input
- JES2 will read the the input data for a job, assign an identifier to it and put the JCL of the job onto a dataset called spool
- Conversion
- This is when JES2 will parse the JCL provided for the job and look for any errors. If there are no errors, the JCL gets converted into machine language
- If there are errors found, the job does not progress and instead is queued for output with a nice error message to accompany it
- Processing
- One of the spooled and waiting jobs will be selected and sent to z/OS for actual processing of whatever it is the job is to do
- Output
- The output produced by the job will be analysed by JES2 and placed in the correct queue
- Hardcopy
- Some of the output might be for example printed. This would happen now
- Purge
- The job is purged from the spool and the space is freed up for another one to take its place
We can take a look at those phases in some more detail
Input
In this phase a job consisting of JCL overview statements nad possibly in-stream data is read onto DASD. From here the job awaits selection for processing by JES 2.
Conversion
In this phase the JCL overview of a job is merged with the JCL of procedures from the procedure libraries. Then it is checked for syntax or format errors. If they are found the JES2 issues messages and the job is queued for output rather than execution
Processing
In this phase the job selected for execution in accordance with its priority and class. In case of WLM initiators, the initiators will select the jobs based on their service class and the order in which they were made available.
During execution the main steps that occur are
- The job is given to an initiator and execution begins
- SYSIN data is passed to the program
- SYSOUT data is written to DASD spool devices.
Output
During this phase data sets are grouped according to output characteristics such as:
- Type of forms to be used
- Universal Character Set to be used during printing
- Forms Control Buffer to be used during printing
The job output data sets are then queued according to the output class assigned to the job and the priority assigned to the job
The output class defined the final destination of the job output. Out put destined to be printed is grouped together to save continually changing the stationary, For example
- CLASS A = plain paper
- CLASS B = letterhead paper
Other output might be destined to be checked by a job scheduling program or might be removed from the spool for archival purposes. Output priorities are a number from 0 to 255 with 255 being the highest
Hard copy
The output of a job is printed on a local or remote printer, or sent to another JES2 system via the NJE The operator decides which class is to be printed and the jobs will print according to the assigned priority.
If two jobs have the same class and priority, the one that will have been waiting for longest will be the one selected first.
Purge
The purge phase occurs only after all of the output is removed, even if just one element remains, no space will be released. This can lead to a situation where a few hundred lines of output left can still hold a significant amount of spool space, even after millions of lines of the output have already been printed or transmitted.
After a successful purge, the space on the DASD that weas used by the job is released, as are all of the other resources the job has used.