//IDxxxxx JOB
MSGCLASS=X,MSGLEVEL=(1,1),CLASS=B,
//
REGION=5M,NOTIFY=&SYSUID,TIME=(5,0)
Job structure
When
to use JCL :
JCL is used in a mainframe environment to
act as a communication between a program (Example: COBOL, Assembler or PL/I)
and the operating system. In a mainframe environment, programs can be executed
in batch and online mode. Example of a batch system can be processing the bank
transactions through a VSAM (Virtual Storage Access Method) file and applying
it to the corresponding accounts. Example of an online system can be a back
office screen used by staffs in a bank to open an account. In batch mode, programs
are submitted to the operating system as a job through a JCL.
Batch and Online processing differ in the
aspect of input, output and program execution request. In batch processing,
these aspects are fed into a JCL which is in turn received by the Operating
System.
Job
Processing :
A job is a unit of work which can be made
up of many job steps. Each job step is specified in a Job Control Language
(JCL) through a set of Job Control Statements. The Operating System uses Job
Entry System (JES) to receive jobs into the Operating System, to
schedule them for processing and to control the output. Job processing goes
through a series of steps as given below:
1. Job Submission - Submitting the JCL to JES.
2. Job Conversion - The JCL along with the PROC is converted into
an interpreted text to be understood by JES and stored into a dataset, which we
call as SPOOL.
3. Job Queuing - JES decides the priority of the job based
on CLASS and PRTY parameters in the JOB statement (explained in JCL - JOB Statement chapter). The JCL errors are checked and
the job is scheduled into the job queue if there are no errors.
4. Job Execution - When the job reaches its highest priority,
it is taken up for execution from the job queue. The JCL is read from the
SPOOL, the program is executed and the output is redirected to the
corresponding output destination as specified in the JCL.
5. Purging - When the job is complete, the allocated
resources and the JES SPOOL space is released. In order to store the job log,
we need to copy the job log to another dataset before it is released from the
SPOOL
Job
parameters :
1. CLASS: Based on the time duration and the number of resources required by
the job, companies assign different job classes. These can be visualized as
individual schedulers used by the OS to receive the jobs. Placing the jobs in
the right scheduler will aid in easy execution of the jobs. Some companies have
different classes for jobs in test and production environment. Valid values for
CLASS parameter are A to Z characters and 0 to 9 numeric (of length 1).
Following is the syntax<:/p>CLASS=0 to 9 | A to Z
2. PRTY: To
specify the priority of the job within a job class. If this parameter is not
specified, then the job is added to the end of the queue in the specified
CLASS. Following is the syntax: PRTY=N Where N is a number in
between 0 to 15 and higher the number, higher is the priority.
3. NOTIFY: The system sends the success or failure message (Maximum Condition
Code) to the user specified in this parameter. Following is the syntax: NOTIFY="userid
| &SYSUID" Here system sends the message to the user
"userid" but if we use NOTIFY = &SYSUID, then the message is sent
to the user submitting the JCL.
4. MSGCLASS: To specify the output destination for the system and Job messages
when the job is complete. Following is the syntax: MSGCLASS=CLASS Valid
values of CLASS can be from "A" to "Z" and "0" to
"9". MSGCLASS = Y can be set as a class to send the job log to the
JMR (JOBLOG Management and Retrieval: a repository within mainframes to store the
job statistics).
5. MSGLEVEL: Specifies the type of messages to be written to the output
destination specified in the MSGCLASS. Following is the syntax: MSGLEVEL=(ST,
MSG) ST = Type of statements written to output log
When ST = 0, Job statements only. When ST =
1, JCL along with symbolic parameters expanded. When ST = 2,
Input JCL only. MSG = Type of messages written to output log.
When MSG = 0, Allocation and Termination messages written upon
abnormal job completion. When MSG = 1, allocation and
Termination messages written irrespective of the nature of job completion.
6. TYPRUN: Specifies a special processing for the job. Following is the
syntax: TYPRUN = SCAN | HOLD Where SCAN and HOLD has the
following description TYPRUN = SCAN checks the syntax errors of the JCL without
executing it. TYPRUN = HOLD puts the job on HOLD in the job queue.To release
the job, "A" can be typed against the job in the SPOOL, which will
bring the job to execution.
7. TIME: Specifies
the time span to be used by the processor to execute the job. Following is the
syntax: TIME=(mm, ss) or TIME=ss Where mm = minutes and ss =
seconds This parameter can be useful while testing a newly coded program. In
order to ensure that the program does not run for long because of looping
errors, a time parameter can be coded so that the program abends when the
specified CPU time is reached.
8. REGION: Specifies the address space required to run a job step within the
job. Following is the syntax: REGION=nK | nM Here, region can
be specified as nK or nM where n is a number, K is kilobyte and M is Megabyte.
When REGION = 0K or 0M, largest address space is provided for execution.In
critical applications, coding of 0K or 0M is prohibited to avoid wasting the
address space.
9. BYTES: Size of data to be written to output log and the action to be
taken when the size is exceeded.
10. LINES: Maximum number of lines to be printed to output log.
11. PAGES: Maximum number of pages to be printed to output log.
12. USER: User id used to submit the job.
13. PASSWORD: Password of the user-id specified in the USER parameter.
14. COND and RESTART: These are used in conditional job step processing and are
explained in detail while discussing conditional Processing.
Please refer to other tutorial sites for PROC, EXEC, DD, Dataset
definitions and other Utility definitions and syntaxes. I recommend the
following sites.
No comments:
Post a Comment