Chapter 2. Job management 13
The first step was described briefly in the previous section and it should not
present much difficulty for Java developers because the process of writing and
compiling Java programs is the same on any platforms.
2.2.1 Overview of Job Control Language
Job Control Language (JCL) is a scripting language used to control the
execution of programs in mainframe operating environments. A JCL script
describes the unit of work to be performed (job steps), resource allocations (for
example, data set and memory), and much more.
A JCL script typically consists of a job card, data definition (DD) statements, and
EXEC statements. A
job card marks the beginning of a job and tells the system
how to process the job. It includes information such as a job name, accounting
information, and message level and class.
An
EXEC statement identifies a step within a job and describes a program to be
executed in the step. A job typically consists of several job steps.
The
REGION parameter specifies the virtual storage allocation required for this
step. For example, REGION=32M means the step requires 32 megabytes of
virtual storage.
The
COND parameter is used to specify when this step should be executed. For
example, COND=(0,NE) means this step gets executed only when all of the
previous steps finished with a return code of 0.
DD statements describe the I/O resources required for the step.
The syntax of JCL scripts is very strict. It is especially sensitive regarding the
starting positions of various keywords and the continuation of a statement on the
next line. Basic JCL syntax is summarized below:
򐂰 All JCL statements must start in column 1 and be identified by // (two slashes)
at the beginning of the line.
򐂰 All statements must start in column 1 and end in column 71.
򐂰 A comma indicates the statement has a continuation.
򐂰 A continuation of a statement must start between column 4 and 16.
򐂰 //* at the start of the line marks a comment line.
14 Java Stand-alone Applications on z/OS Volume 1
Once a job is submitted to the system, it is the responsibility of the Job Entry
Subsystem (JES)
to schedule and execute the job. There are two versions of JES
systems supported, JES2 and JES3. An overview of the job submission and
execution process is shown in Figure 2-1. A user submits a job to the system via
JES. JES interprets the JCL and passes the job to the system for processing with
required resources. Once the job is completed by the system, JES collects the
output and information about the job and returns it to the user.
Figure 2-1 Overview of job submission and execution
Example 2-2 on page 15 shows a typical JCL script that invokes a REXX exec
called MYREXX. REXX execs are invoked using a program called IRXJCL.
IRXJCL must know where to find the REXX exec to execute, which is specified
using a DD statement called SYSEXEC. The MYREXX exec uses two
Tip: Since the syntax of JCL scripts is very strict, the syntax highlighting
feature of the ISPF editor may help identify problems. The syntax highlighting
feature of the ISPF editor can be turned on by typing the following command
at the command prompt:
HILIGHT ON
User
User
JES
Job
Job
Results
Results
Resource
Resource
Resource
zSeries

Get Java Stand-alone Applications on z/OS, Volume I now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.