Defining and Managing JCL for a Job

A job needs job control language (JCL) instructions to perform a task. The required JCL is contained in the JCL member of a library/file of the operating system, or in a Natural object contained in a Natural library/system file.

This section provides information on defining a JCL for a master job and editing the JCL source referenced by a job.

Note:
FTP jobs do not have a standard JCL definition. They have an FTP parameter definition instead.

This document covers the following topics:

Related Topics:


Job Control for Jobs under BS2000

This section covers the following topics:

Naming Conventions for Work Files

The name generation for work files under BS2000 is described in the section Naming Conventions for Work Files of the Installation and Setup documentation.

User Exit for Work File Names

Names of BS2000 work files can also be generated via an exit (see Generating SYSOUT File Names for BS2000 in the section API Routines).

Job Control for Jobs under UNIX

The environment variable $EOR_WORK of Entire System Server/UNIX contains the name of the Entire Operations work directory. Within this directory, the work files are hierarchically stored.

Job Control for Jobs under Windows

This section covers the following topics:

Job Control Characteristics under Windows

The job control system Entire Operations also runs in a Windows environment, with the following characteristics:

  • Operating system neutral modeling of job networks.

  • Entire Operations' functionality and flexibility is also transparently available on Windows.

  • Support of DOS batch files and executables (EXE).

  • It is not necessary to directly enter Windows DOS commands.

  • Can also run in mixed mainframe/Windows/UNIX environments.

  • Job control on several Windows machines at the same time.

Components Required

  • Entire Operations Monitor

    The monitor can run under the operating systems BS2000, z/OS, z/VSE, or UNIX, concurrently controlling jobs executed under BS2000, z/OS, z/VSE and UNIX.

  • Entire System Server - For Mainframes, UNIX and Windows

    Required to access mainframe, UNIX or Windows operating systems.

    On every machine to be controlled, an Entire System Server/Windows server has to be installed. This is installed as a Windows service and is administrated with the Windows services administration.

  • Entire Net-work/EntireX Broker

    Used as the transport layer.

Executing Operating System Functions

For executing operating system functions, there is a server of type Entire System Server/Windows on each Windows node. This server runs as a background Windows process.

The Entire Operations Monitor and the Entire Operations online application use the following components for server communication:

  • The System Automation Tools (SAT) communication layer

  • The EntireX Broker for transmitting client/server requests

  • Entire Net-work as the transport layer

  • Up to 740 Windows nodes can be served concurrently

File Names

As there is no backslash (\) available on mainframes, Windows file names can be written with a slash (/) as an alternative as well if the character sequence +F+ directly precedes the file name. This applies to file names within JCL as well.

Example:

Original Windows c:\jcl\script1.bat
Alternative representation +F+c:/jcl/script1.bat

SYSOUT Redirection

From the Entire Operations Monitor, all jobs are started which redirect their output to a file. The SYSOUT files are stored in the Entire Operations work directory. If the job is repeated, the old SYSOUT file is renamed.

Entire Operations Work Directory

The Entire System Server/Windows environment variable %EOR_WORK% contains the name of the Entire Operations work directory. Within this directory, the work files are stored hierarchically.

The name generation for work files under BS2000 is described in Naming Conventions for Work Files Created by Entire Operations, Windows in the section Installing Entire Operations on Mainframes in the Installation and Setup documentation.

The name of the work directory for an active network is available in the predefined symbol P-NADIR. You may store application-specific work files there, provided there are no naming conflicts with files created by Entire Operations.

Work files created by Entire Operations or by the application are deleted by the Entire Operations Monitor on network or job deactivation.

Environment Variables

You can use Windows environment variables freely within file names. This corresponds to the behavior of BAT files. You can combine environment variables and variables from symbol tables.

Job Control (JCL)

The Windows JCL can be stored in any place. Among other places, it can be stored in Natural text objects or in mainframe files. Symbol replacement and JCL generation (jobs with JCL location MAC) are available.

Job Start and Job Control

The Entire Operations Monitor starts jobs based on conditions and on time. Accounting data is retrieved and stored. You can manually cancel the job from the online environment.

End-of-Job Check

Entire Operations adds some echo commands to the Windows job control. This allows control of certain messages in the SYSOUT:

  • Starting and ending message with timestamp

  • Elapsed job time

These messages are used to check whether a job did run completely. Additionally, accounting information is retrieved. For checking the job, strings can be searched for in SYSOUT and End-of-Job check routines can be used.

End-of-Job Actions

You can send messages (for example by e-mail) to other users from the Windows node. In the Windows node definition, a program for sending mail can be defined. It is required that this program can be started from the DOS command prompt. One example for such a program is the shareware wsendmail. All other forms of news broadcasting, such as the Entire Operations Mailbox, can still be used.

You can define printing of files and of SYSOUT lists as an End-of-Job action. For each Windows node, a Windows print command with a variable for the file name can be defined. User exits can help start further actions.

Defining Master JCL for a Job

Start of instruction setTo define master JCL for a Job

  1. In the Maintenance Job Master window, open the tabbed page JCL Definition:

    graphics/jcldefinition_jobmaster.png

  2. Make your definitions. The input fields and special functions available are explained in Fields: Master JCL Definition and Functions: Master JCL Definition.

  3. Choose OK to save your definitions.

If you want to edit the defined JCL, proceed as described in Editing Master JCL and Natural Sources.

This section covers the following topics:

Fields: Master JCL Definition

The fields on the JCL Definition page are described in the following table:

Field Description
Use symbol as JCL node Select this check box if you want to use a symbol as a JCL node.
JCL Location  Type of JCL storage location.

For selection options, see JCL Locations.

In a network definition, this field serves as a default for the entire network. See also the section .

JCL Node  JCL for the job is read from this node.

The job is started on the execution node. The default is the value specified in the job network definition (see Fields: Network Definition), which can be overwritten here.

Note:
In this field, you can also enter PMPA preceded by an escape character, for example, §PMPA. See §PMPA in the section Symbol Table and Symbol Maintenance.

JCL Load Mode

Possible selection options:

At activation Load JCL at activation time (default).
At submission

Load JCL at submission time. Use this only if prerequisites for JCL are not available at activation time.

Notes:

  1. JCL load errors will be detected very late.
  2. Network execution may slow down, because of the time necessary for JCL load before submission.
  3. JCL pregeneration also works with submission time JCL load.
  4. If resources are defined, they will be allocated before a JCL load at submission time. If the JCL load fails, the allocated resources will be freed immediately.
  5. JCL loading at submission time is mainly intended to allow the generation of macro JCL as late as possible.
  6. For other types of JCL, we still recommend submission time symbol replacement, which causes less system overhead.
File/Natlib  Storage type of the JCL corresponding to the job type.

For Natural programs and dynamic JCL (storage type NAT): the Natural library where the program or the variable JCL resides. The Natural library must reside in the Entire Operations FUSER system file and must not have the same name as the Entire Operations library.

For z/VSE: library and sub-library associated by a period (.).

For all others: the file name.

You can select the required library or file from the drop-down list box.

For BS2000: The default pubset will be stripped from the file name prior to storing it. This allows easier migration to another default pubset.

For UNIX: Be aware of upper and lower case. You may use environment variables and symbols within names.

Symbols may be used. If a JCL file contains the activation escape character (see Escape Characters), a symbol replacement will be performed:

  • at JCL editing (temporary, using the master symbol table).

  • at JCL loading (permanently, using the active symbol table).

For detailed information, see the section Symbol Table and Symbol Maintenance.

Member  Name of the Natural object or library/file member of the operating system that contains the JCL. When you add a new job definition, the name of the job is entered in this field by default.

You can select the required member from the drop-down list box.

New Members:

You can also enter the name of a non-existing member if, for example, no JCL has yet been defined for the job. Entire Operations accepts the member name assuming a member with this name will be created.

Before activating a network and before starting a job, Entire Operations checks whether a member has been defined. If there is no member, an error message is issued.

Symbols may be used. If a JCL file contains the activation escape character (see Escape Characters), a symbol replacement will be performed:

  • at JCL editing (temporary, using the master symbol table).

  • at JCL loading (permanently, using the active symbol table).

This applies to all JCL locations which support members: see List of JCL Locations.

For detailed information, see the section Symbol Table and Symbol Maintenance.

Note for BS2000:

JCL location PRC (Callable procedure): If no member is specified, the JCL file must be a BS2000 sequential file.

VolSer  Volume serial of the file.

Only required if the file has not been cataloged (z/OS only).

Password  The file password if the file has been protected by a password.
OS Specials Operating system-dependent input fields: see Fields: Operating System Specials for JCL.

Functions: Master JCL Definition

The following special function is available on the JCL Definition page:

Function Description
Edit Opens the editor for the source entered in the Member field or the file entered in the File/Natlib field depending on the specified JCL location.

This command is only available if you are authorized to edit the specified source and if the Apply and OK buttons are disabled in the window.

This command corresponds to the Edit Master JCL or Edit Active JCL function available from the context menu of a selected job instance.

See also Editing Master JCL and Natural Sources.

Displaying Master JCL

Start of instruction setTo display the master JCL source defined for a job

  • In the object workspace, select a Job Master instance and choose Browse Master JCL from the context menu.

    A Browse window similar to the Edit window opens displaying the source of the JCL.

JCL Locations

This section covers the following topics:

List of JCL Locations

Entire Operations offers a broad range of possible locations for its original (master) JCL.

The following table describes the physical locations you can select for JCL from the JCL location drop-down list box on the JCL Definition page.

The locations NAT (Natural source) and MAC (Macro Natural source) are available on all operation systems supported by Entire Operations. Other locations are available for individual operating systems only as indicated in the following table:

JCL Location/Selection Option Applies to Operating System Description
blank field

(No JCL required)

 
n/a None (no JCL required).
BS2

SAM or ISAM

 
BS2000 SAM or ISAM file.

See also BS2000 in Fields: Operating System Specials for JCL.

EXE

Executable program

UNIX, Windows Executable, for direct file execution.

Not intended for shell scripts or BAT files.

You can pass parameters to the executable file with the predefined CMDLINE-job symbol. See Predefined Symbols for Command Line Parameters in the section Symbol Table and Symbol Maintenance.

LIB

Librarian

 
z/OS Librarian.
LMS

LMS library

 
BS2000 LMS library.

See also BS2000 in Fields: Operating System Specials for JCL.

MAC

Macro Natural source

 
all For macro JCL.

A Natural source object will be used.

NAT

Natural source

 
all Natural source object.

See also Restriction for Job Types.

PDS

Partitioned data set

z/OS Member of a partitioned data set.

See also Restriction for Job Types.

PRC

Callable procedure

 
BS2000 BS2000 procedure.

See JCL Location PRC: BS2000 Procedure for more information.

RDR

z/VSE reader queue

 
z/VSE z/VSE reader queue for job type STC (Started Task).
VSE

z/VSE sublibrary

 
z/VSE z/VSE member in z/VSE sublibrary.
TXT

Text file

 
UNIX, Windows Text file.

See also UNIX and Windows in Fields: Operating System Specials for JCL.

Restrictions for Job Types

  • Jobs of the type STC (Started Task) must have the location PDS on z/OS.

  • Jobs of the type NAT (Natural Program) must have the location NAT.

  • Jobs of the type DUM (Dummy Job) must not have any JCL location.

  • Jobs of the type FTP (File Transfer Job) do not require a JCL location. Entire Operations generates the FTP JCL itself, depending on the FTP parameters defined on the FTP Definition page.

During definition, it is checked whether the defined JCL exists at all. If the JCL cannot be found, a warning appears in the Job JCL Definition (Master) window.

Location on another Node

The JCL can be saved on another machine, not identical with the executing machine and even on another operating system, not identical with the executing operating system.

Replacing Symbols

In all JCL locations, you can easily replace symbols as described in Symbol Replacement in the section Symbol Table and Symbol Maintenance.

JCL Location PRC: BS2000 Procedure

If this location has been defined, Entire Operations generates a BS2000 ENTER job in the active JCL calling this procedure.

The following rules are applied:

  • If no JCL member is specified, the JCL file must be a BS2000 sequential file. If a JCL member is specified, the JCL file must be a BS2000 LMS library.

  • The BS2000 job name adopts the Entire Operations job name and if it is longer than 8 characters, it cuts the name to 8 characters.

  • SDF statements (CALL-PROC) are used.

  • The symbol table for which the job has been defined must contain all parameters of the BS2000 procedure. The symbol values are used for calling the BS2000 procedure.

  • Positional and keyword parameters are supported.

  • Numbers and names of the parameters are automatically retrieved from the procedure (PROC / BEGIN-PROC statement).

  • The generated CALL-PROCEDURE statement has the parameter LOGGING=*YES.

  • BS2000 job submissions will be performed with the generated line /MODIFY-SDF-OPTIONS CONTINUATION=*NEW-MODE.

JCL Frames for BS2000 DO Procedures

For BS2000 procedures, a user-defined JCL frame can be used. It must be saved under the name PRCFRAME in the library SYSEOR. If it is not found, Entire Operations generates a standard frame.

Special Commands

Command Description
#ESC-FRAME <c> 

Defines the escape character the JCL frame uses to replace symbols.

This command must be at the top and is compulsory.

#CALL-PROC 

The procedure call (/CALL-PROC) is generated here.

Adding User-Defined Parameters to the /CALL-PROC Statement

It is possible to add user-defined parameters to the CALL-PROC statement in the PRCFRAME text object. The following applies:

  • The #CALL-PROC line must look like #CALL-PROC -. The minus sign indicates a continuation. In the generated JCL, it will be placed in column 72.

  • The user-defined continuation(s) follow the #CALL-PROC line. They must begin with the following characters: / ,.

Example:

#CALL-PROC -
/ ,LOGGING=YES

Example

#ESC-FRAME §
/.SN§P-RUN LOGON SN,1
/REMARK === PRC FRAME EXAMPLE
/REMARK §AAAA YYYYYYYYYYYYY
#CALL-PROC
/STA L
§BBBB
/LOGOFF

Notes:

  1. All symbols used in the JCL frame must be contained in the active symbol table of the job. The active symbol table must continue to contain all symbols for calling the procedure.
  2. If a symbol does not exist, job activation is discontinued.

Defining Operating System Dependent JCL Specifications

Some operating systems or JCL locations may require some additional definitions.

Start of instruction set To define JCL parameters specific to an operating system

This section covers the following topics:

Fields: Operating System Specials for JCL

The operating system specific input fields provided in the OS Specials section of the JCL Definition page are described in the following table.

Operating System Field Description
BS2000 Default User ID Valid logon user ID defined for BS2000. This ID has no meaning for other operating systems. Unqualified file and job variable names in this job definition are prefixed with this BS2000 user ID.

Note:
The user ID TSOS can be defined only if the user defining the ID is working under TSOS.

See also the default setting User ID Definition described in Defaults for Other Settings in the Administration documentation.

JCL User ID   If this field is not empty, the JCL is loaded under the rights of this BS2000 user ID and may be overridden by specific definitions. TSOS may only be defined, if the defining user is working under TSOS.

Default: If this field is left blank, the user ID from the fully qualified JCL file name is used as JCL User ID.

See also the default setting of User ID Definition (Defaults for Other Settings, Administration documentation), and the sections Operating System User IDs and Default User ID Determination.

Member Version Applies to the JCL locations LMS (LMS library) and PRC (Callable procedure).

Version of the specified LMS member.

This must be exactly the same as given in LMS itself. Leading zeroes must be specified in the same way.

Member Type  Applies to the JCL locations LMS (LMS library) and PRC (Callable procedure).

LMS member type.

Possible selection options:

Source program
Procedure or ENTER job
Document
Data of any format
z/OS JCL User ID  JCL in z/OS will be loaded under this user ID by the Entire Operations Monitor. You may define this field only if you are logged on to the JCL node with the same user ID.

Default: If this field is left blank, the user ID of the last modification is used as JCL User ID.

See also the default setting User ID Definition (Defaults for Other Settings, Administration documentation), and the sections Operating System User IDs and Default User ID Determination.

VolSer  Volume serial number of the file where the JCL resides.

Only required if the file has not been cataloged.

z/VSE Library  Name of the z/VSE library within the selected file.
Sublib  Name of the z/VSE sublibrary within the selected file.

You can select a name from the drop-down list box.

Member  Name of the member where the JCL for the job resides.

You can select a name from the drop-down list box.

Member Type  Member type of the z/VSE library.
Volser  Volume serial number of the file where the JCL resides. This is a required parameter for z/VSE.
VSAM Catalog  Name of the VSAM catalog for the selected file.
UNIX and Windows JCL User ID The Entire Operations Monitor will load JCL with the access rights of this user ID.

See also the default setting User ID Definition (Defaults for Other Settings, Administration documentation), and the sections Operating System User IDs and Default User ID Determination.

JCL Group UNIX group or Windows domain (optional) .

UNIX: If this field is blank, the user's default UNIX group (from /etc/passwd) is used. Otherwise, this field must contain one of the UNIX groups, which is visible in the output of the UNIX groups command.

Windows: The Windows domain to be used for the logon.

UNIX Group (optional) (Not relevant for Windows)

If this field is blank, the user's default UNIX group (from /etc/passwd) is used. Otherwise, this field must contain one of the UNIX groups, which is visible in the output of the UNIX groups command.

Handling JCL during Job Submission

This section covers the following topics:

JCL Modifications during Submission

Jobs defined and scheduled in Entire Operations are submitted automatically under the control of the Entire Operations Monitor. During the submission process, the submitted JCL can be handled in any of the following ways:

  • Completion or modification of the job JCL according to the Entire Operations defaults;

  • Checking of all submitted JCL by a global user exit (to be defined in the Entire Operations defaults);

  • Insertion of header information as comments into the submitted JCL. This is always performed. The header information can be viewed in the job SYSOUT as shown in the following example:

     Job SNNOPEX (1355) Type SM File 2------------------------------ Columns 001 072
     ====>                                                           SCROLL===> CSR
     ***** ****************************** top of data ******************************
     00001         1 //NOPE01J1 JOB ,SN,CLASS=G,MSGCLASS=X,MSGLEVEL=(1,1),
     00002           // TYPRUN=SCAN
     00003           *** $ACFJ219 ACF2 ACTIVE DAEF
     00004           *** =====================================================
     00005           ***                S O F T W A R E   A G
     00006           ***          E N T I R E   O P E R A T I O N S
     00007           ***
     00008           *** Owner:    SN         Run:           328
     00009           *** Network:  SN-2       Symbol Table:  EXAM-ST1
     00010           *** Job:      CHECK-TIME Escape Act:    Sub: $
     00011           ***                      Submit Userid: SN
     00012           ***
     00013           *** 29.10.08 15:15 activated        by SN
     00014           *** 29.10.08 15:15 created/modified by SN
     00015           *** 29.10.08 15:15 submitted
     00016           *** =====================================================
     00017           *** Symbols replaced at Activation Time:
     00018           ***

    Note:
    In BS2000, the LOGON statement is checked. If nothing else was specified at job definition, the LOGON parameters, account-number, job-class, monitoring job variable (with password, if specified) are taken from here. Job priority, run priority and CPU time limit can also be given via LOGON statement.

  • Insertion of information about all replaced symbols and their current values if any symbols were replaced. For example:

     Job SNNOPEX (1355) Type SM File 2------------------------------ Columns 001 072
     ====>                                                           SCROLL===> CSR
     00015           *** 29.10.08 15:15 submitted
     00016           *** =====================================================
     00017           *** Symbols replaced at Activation Time:
     00018           ***
     00019           *** Symbol  : UID
     00020           ***   Owner : SN  Symbol Table: EXAM-ST1
     00021           ***   Modif.: SN  at 22-06-07 12:31
     00022           ***   Value : SN
     00023           *** Symbol  : CLASS
     00024           ***   Owner : SN  Symbol Table: EXAM-ST1
     00025           ***   Modif.: SN  at 22-06-07 12:32
     00026           ***   Value : G
     00027           *** Symbol  : MSGCLASS
     00028           ***   Owner : SN  Symbol Table: EXAM-ST1
     00029           ***   Modif.: SN  at 22-06-07 12:32
     00030           ***   Value : X
     00031           *** Symbol  : P-EXECUTION-NODE
     00032           ***   Value : 146
     00033           *** Symbol  : JOBLIB
  • Replacement of symbols in the JCL with their current values at submission time.

  • For z/OS only:
    If a submission time symbol replacement error occurs, a JCL error will be forced to prevent from an execution of the job. Lines similar to the following will force a JCL error:

    // ###### Entire Operations Symbol Replacement Error ######

    The job will remain in an error status such as follows:

    JobId 51058 - Symbol Replacement Error

    End-of-Job processing will not be reached, because this is treated as a submission error.

See also Working with Entire System Server Nodes in the section Operating System User ID.

Notes about the JCL Header Generation

  1. The Submit User ID is always shown.

  2. The created/modified user ID is modified only if the job definition or JCL was modified. Activation or re-activation does not count as a modification.

Trigraph Encoding for JCL Submission on UNIX and Windows

Trigraph encoding is used to avoid translation failures during ASCII/EBCDIC text conversion. An ASCII character for which no equivalent EBCDIC character exists is then substituted by a trigraph and the text can be encoded successfully.

Entire Operations uses trigraphs when generating JCL for UNIX and Windows. For Entire System Server execution nodes on UNIX and Windows, trigraph encoding is switched on by default using the question mark (?) as the default escape character.

You can switch on and off trigraph encoding in the JCL with the following command:

#EOR-TRIG=YES Enables trigraph encoding.
#EOR-TRIG=NO Disables trigraph encoding.

The command can be placed at the beginning of a line or within a comment line.

Example

  ...
  # #EOR-TRIG=NO
  ls example.???    
  # #EOR-TRIG=YES  
  if ??( a == b ??) then
  ...

Supported UNIX and Windows Trigraphs

Entire System Server execution nodes on UNIX and Windows support the trigraphs listed in the following table. A trigraph always begins with two escape characters; the table below assumes the question mark (?) to be the default escape character.

ASCII Trigraph Remarks
[ ??(  
\ ??/  
] ??)  
^ ?? '  
{ ??<  
| ??_  
} ??>  
~ ??-  
@ ??%  
` ??;  
! ??:  
\f ??+ Form feed
\t ??& Tab

Symbol Replacement in JCL

Symbols for replacement can be defined for all storage locations of master JCL.

Escape characters for symbols can be assigned system-wide, and they can also be defined individually for each job. Defaults for escape characters can be defined for each operating system.

Escape characters for symbol replacement must not conflict with other characters used in the JCL.

For detailed information, see the following sections in Symbol Table and Symbol Maintenance:

Pregenerating Active JCL

For performance reasons, it might be necessary to pregenerate active JCL to be used for job submission. This function is conceived mainly for macro jobs, whose dynamic JCL generation can become time-consuming, because macro language must always be executed. JCL can also be pregenerated for all other job types.

Note:
In the case of a resubmission of the active job, the pregenerated JCL is not reloaded if the active JCL of the job has been edited in the meantime.

Start of instruction setTo pregenerate active JCL

  • In the object workspace, select a Job Master instance and choose Pre-generate Active JCL from the context menu.

    If no generation errors occur, a message indicates that active JCL is pregenerated for the job.

This section covers the following topics:

Related Topic:

Editing Pregenerated JCL

This function allows editing the pregenerated JCL.

Start of instruction setTo edit pregenerated JCL

  1. In the object workspace, select a Job Master instance for which pregenerated active JCL exists.

  2. Choose Edit pre-generated JCL from the context menu.

    An Edit window opens where you can change the pregenerated JCL as required.

    See also Editing Master JCL and Natural Sources.

Removing Pregenerated JCL

Start of instruction setTo remove pregenerated active JCL

  1. In the object workspace, select a Job Master instance for which pregenerated active JCL exists.

  2. Invoke the context menu and choose the Remove pre-generated Active JCL function.

    The message Pregenerated JCL deleted indicates that the pregenerated JCL has been removed.