Symbol Replacement

Symbols are replaced during network or job activation or during job submission:

  • Symbols starting with the activation escape character are resolved during JCL loading, as part of the job activation.

  • Symbols starting with the submit escape character are resolved during job submission.

    Note:
    If a symbol replacement error occurs at submission time, the event JNR Job not run - JCL error will be set to occurred. If the event JNR is not defined, it will be added to the active job.

Note for BS2000:

BS2000 SYSJV references (for example, &($SYSJV.TSN) are no longer treated as Entire Operations symbols, regardless of whether they are prefixed with an ampersand (&) denoting an activation escape or submit escape character.

This document covers the following topics:


Symbol Escape Characters

In JCL and Natural macro sources, the symbols to be subsituted must be preceded by an escape character.

You can use different escape characters to determine whether symbol replacement is performed during JCL generation or job submission.

The following escape characters can be used in parallel in your Entire Operations environment:

  • Activation Escape Character

    Symbols preceded by the activation escape character are replaced during activation of a network or job.

    If a JCL file contains the activation escape character, a symbol replacement is performed:

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

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

  • Submit Escape Character

    Symbols preceded by the submit escape character are replaced during submission of a job. They can be used to pass symbol values that cannot be specified earlier when the job is activated.

Both activation escape and submission escape characters can be defined as system-wide defaults in the Entire Operations default settings (see Defaults for Network Options in the Administration documentation). However, different escape characters can be used for each job if necessary.

You can also specify escape characters in your JCL our MACRO source. See also Defining Escape Characters.

Caution:
If you change escape character definitions for existing JCL, symbols to be replaced can no longer be detected. In this case, consider defining escape characters in your JCL or MACRO source.

Recommended Escape Characters

We recommend that you use the following escape character:

Operating System Escape Characters
z/OS § (section sign) and $ (dollar sign)
z/VSE § (section sign) and # (number sign)
BS2000 ^ (circumflex accent) and ` (grave accent)

Do not use $ (dollar sign) because it has a special meaning in BS2000.

UNIX, Windows No recommendation, except for UNIX:

Do not use $ (dollar sign) because it has a special meaning in UNIX.

Caution:
We strongly recommend that you do not define escape characters already used by other (operating system specific) JCL features, for example, parameters for DO procedures and SUBDTA characters in BS2000.

Defining Escape Characters

This sections describes the options provided to define your default activation and submit escape characters.

  • Default Settings

    The Network Options page of the Entire Operations Defaults function (see the Administration documentation) is used to define the default for all networks in your Entire Operations environment.

    On the Operating System Specials page, you can also define the default escape characters for each operating system.

  • Network Definition

    Defines the default escape characters to be used by all jobs of a network.

  • Job Definition

    Defines the default escape characters to be used by an individual job.

  • Definitions in JCL and Macro Sources

    In JCL and Natural macro sources, the symbols to be subsituted must be preceded by an escape character.

    You can define default escape characters in Entire Operations JCL or Natural macro sources by coding one or both of the following meta statements as the first source line(s):

    #EOR-ESC-ACT = activation-character
    #EOR-ESC-SUB = submit-character

    For example:

    #EOR-ESC-ACT = § 
    #EOR-ESC-SUB = ^

    The #EOR-ESC-ACT = activation-character meta statement is evaluated when the JCL containing this statement is loaded. activation-character overrides any activation escape characters currently used in your active job networks. The meta statement is removed from the active JCL after loading.

    The #EOR-ESC-ACT = submit-character meta statement is evaluated during job submission. submit-character overrides any submit escape character currently used in the active job. The meta statement is kept in the active JCL after loading.

    Both meta statements are logged when they are evaluated during JCL loading or job submission.

    If you add a meta statement to a Natural macro source, you have to recatalog the source with the MACRO command.

Symbol Prompting during Network or Job Activation

Entire Operations provides a standard method for symbol prompting. Standard symbol prompting is not used in NET-type (subnetworks) jobs. On a full-sized screen, all necessary symbols are displayed and can be modified by simply typing over them.

If any of the activated jobs are MAC-type jobs (dynamic JCL generation) or JOB-type jobs whose JCL contains symbols for variable values, these symbols are replaced by their current values during the manual activation, except those that are defined to be replaced at submission time.

In a job network definition and in the subsidiary jobs, several symbol tables can be defined. During a network or job activation, all symbol tables are prompted sequentially, which contain at least one symbol to be prompted.

Note:
Up to 100 different symbol tables can be prompted during a network activation.

If the activation is manual and if the JCL of a job contains symbols that are defined to be prompted, you are prompted for the values to be used in this activation. You can add new symbols and modify existing symbols of the active symbol table used during the network activation. Additionally, you can save the current symbols as a file.

Start of instruction setTo modify and confirm symbols and save the active symbol table as a file

  1. Activate a network with at least one symbol defined for prompting.

    A Symbol Prompting window similar to the example below opens:

    graphics/symb_prompting.png

    The window lists all the symbols requiring prompting in the symbol table and their values. The symbol values are taken from the corresponding master symbol table.

    You can add new symbols, modify existing symbol values or leave them unchanged. The new values remain in the symbol table until the symbol table is modified specifically or until the next prompting after manual activation of a job network that uses the symbol table.

    Note:
    If a validation check is defined for the symbol, you can only enter a valid symbol value. Incorrect values are rejected and a user-defined error message is issued.

  2. Choose Continue when you are finished.

    If Save active symbol table as file is selected in order to save the active symbol table as a file, a window opens for the file specification: see To save an active symbol table in the section Saving Symbol Table Information as a File.

    Choose OK when you are finished.

Specifying User Exits for Symbol Modification

You can specify a customized user exit routine that defines your own validation checks and help information for symbol prompting. This can be used to modify active symbols depending on the values of other symbols, or of anything else.

You can then adapt a symbol table during each job run with or without using a window that prompts you for input. If you do not use a prompting window, the symbol table is adapted automatically in the background.

For details on defining user exit routines, see User Exits for Validation Checks of Symbol Values in the section User Exits.

Start of instruction setTo specify a user exit for symbol modification

  1. In a Network Master window, open the tabbed page Symbol Prompting:

    graphics/symbolprompting_networkmaster.png

  2. Specify the type of symbol prompting by defining the Natural library and the respective user exit routine. The fields are explained in Fields: Symbol Prompting User Exit.

  3. Select OK when you are finished.

If no user exit yet exists, you can write a user exit routine as described in User Exits for Validation Checks of Symbol Values in the section User Exits.

This section covers the following topics:

Fields: Symbol Prompting User Exit

The input fields of the Symbol Prompting page are described in the following table:

Field Description
Natural Library  Name of the Natural library where the symbol prompting user exit resides.
User Exit Name of the symbol prompting user exit.
Symbol Modification Symbol modification option(s).

Possible check box settings:

during prompting

(checked)

A window prompts you to modify and/or confirm all symbols and save the active symbol table as a file. See also Example of an Active Symbol Table List.
in Background

(checked)

No prompt window opens.

The symbol modification is managed by the user exit routine which runs in the background.

(both boxes checked) Performs both modification options:

A prompt window opens first and then symbol modification is managed by the specified user exit.

This allows you to set other symbols which are dependent on prompting.

Example of an Active Symbol Table List

The following is an example of an output file generated for an active symbol table using the GUI client:

graphics/active_symbol_table_report.png

The file lists the current status of the symbols defined for the symbol table EXAM-TABLET-V3 which is prompted when the network SAG-PROMPT is activated.

Rules and Restrictions for Symbol Replacement

Notes:

  1. A symbol replacement is always attempted if at least one of the activation or submit escape characters currently in effect is found in a source line (see the section Symbol Escape Characters). It is not necessary for a symbol table to be defined on the job or network level. Symbols can also be replaced via global symbol tables. Predefined symbols can be replaced without having to define a symbol table.
  2. If an escape character is detected and no symbol table is defined, the error message no symbol table defined is issued.

This section covers the following topics:

Related Topic:

Symbol Table Types and Symbol Search Order

The types of symbol tables available and the search order used to find and replace symbols in symbol tables are described in the following section.

Entire Operations first searches for a symbol in the active user-specific symbol table. After this, it searches in the master user-defined symbol table, in the network default symbol table, and finally in the system-wide symbol table. If it searches for the symbol in a subnetwork, the symbol tables of the calling job of type NET as well as the symbol tables of the superior job networks are searched (in ascending order) if necessary.

If a symbol cannot be found anywhere, either the global exit "symbol not found" is called (if defined), which determines the further processing, or the job is set to an error status.

Symbol Table Type Description

Search
Order

Job active

Active symbol table referenced by the active job. 1

Network, active

Active symbol table referenced by the network. 2

Calling job

Active symbol table referenced by the calling job. 

This only applies if the active job is within a subnetwork.

Depending on the subnetwork nesting level, several symbol tables of calling jobs can be searched. The search can repeate recursively ascending.

3

Calling network

Active symbol table referenced by the calling network. 

Depending on the subnetwork nesting level, several symbol tables of calling networks can be searched. The search can repeate recursively ascending.

4

Job master

Symbol table referenced by the master job. 5

Network version

Symbol table referenced in the network version. 6

Owner default

Master symbol table owner/A.

owner is the current owner of the active job.

The symbol table owner/A is searched even if there is no symbol table definition on the job level and/or network level.

7

System default

Master symbol table SYSDBA/A.

The symbol table SYSDBA/A is searched even if there is no symbol table definition on the job level and/or network level. 

8

Note:
If you invoke the link to the symbol table(s) in the object network, master job, or active job, you will get a list of all usable symbol tables for this object in the above hierarchical order.

Nested Replacement

Within nested replacements, the following rules apply:

  • On the top level, only the "original" escape character is checked and replaced.

  • If the activation escape is used on a nested level, only activation escapes are replaced on deeper levels. This is necessary to prevent too early replacements of submission escapes.

  • If the submission escape is used on a nested level, submission and activation escapes are replaced on deeper levels.

Recursive Symbol Replacement

Symbols can be used within other symbols.

Example:

Symbol Value
PREFIX  EOR
STEPLIB  §PREFIX.EXAMPLE.LOAD

§STEPLIB is replaced by EOR.EXAMPLE.LOAD.

Note:
If a point marks the end of a symbol, it is deleted on replacement. With recursive replacement, the deletion takes place replacement by replacement. Thus, a sufficient number of points must be coded. If a point is to remain at the end of the symbol, two points must be coded.

Symbol Replacement in JCL

For symbol replacement in JCL (Job Control Language) submitted on mainframe operating systems (z/OS, z/VSE and BS2000), the following particularities apply:

Column 72 contains one blank and the columns 73 to 80 contain digits. The columns 71 to 80 of the line are saved before the first replacement, and they are written back after the last replacement.
Column 72 contains a hyphen (-) and the columns 73 to 80 contain blanks. The columns 71 to 80 of the line are saved before the first replacement, and they are written back after the last replacement.
Columns 71 to 80 contain a comma (,)

(8 blanks behind the hyphen)

The columns 71 to 80 of the line are saved before the first replacement, and they are written back after the last replacement.
Intermediate results Intermediate results can even be longer than 71 characters. They are only overwritten by possibly saved strings at the end of the replacement as a whole.

Import/Export Restrictions

Avoid the equal sign (=) within a symbol value. This causes problems during the import or export of symbol tables.

Escape Character

Symbols to be replaced are detected by a preceding escape character anywhere in the JCL. See Symbol Escape Characters for details.

Example: Recursive Symbol Replacement

/* IN §JJ. SOFTWARE AG

changes to the following when J = 20 and JJ = §J.01:

/* IN 2001 SOFTWARE AG

The advantage of this method is that symbol replacement is performed within the fixed positions.

Indicator for End of a Symbol Name

Symbol names coded in a source end with one of the following delimiter characters:

blank ( ), comma (,), semicolon (;),
period (.), apostophe ('), commercial at (@),
percent sign (%), logical not (¬), ampersand (&),
parenthesis (( or )), or equal sign (=).

Example: §SYMBOL-1;.

A single period (.) after a symbol is removed during replacement. But two consecutive periods (..) are converted to one period (.). This is important for the dynamic creation of file names. Recursive symbol replacement (symbols within symbols) is also possible.

Symbol Replacement Algorithm

The following algorithm is used for symbol replacement:

  1. Search for the symbol farthest to the left.

    If none (or no more) available -> end.

  2. Replacement

    In case of error -> end.

  3. Write updated line.

    Continue at (1).

    This makes recursive symbol replacement (symbols within symbols) possible.

Fixed Positions within a JCL Line

Note:
This chapter applies to JCL submitted on mainframes only.

Multiple symbol replacement can cause a shift within a line. However, in the following cases, parts of the line are kept in a fixed position:

  1. Symbols do not follow one another directly.

  2. The columns 72 to 80 always remain fixed. If column 70 contains a blank and column 71 a comma, then these will also remain fixed.

  3. If a symbol is followed by at least two blank spaces, the rest of the line is kept in its original position, unless the symbol value would overlap with it. For example:

    /FILE ABC.§VAR             COMMENT

    changes to the following when VAR = REPLACE:

    /FILE ABC.REPLACE          COMMENT
  4. If a symbol is followed directly by continuous text, then by at least two blank spaces, then by an exclamation mark (!) and continuous text: the symbol is replaced as in (2) and the exclamation mark (!) is replaced by blank spaces. For example:

    /FILE ABC.§VAR..XYZ       !COMMENT

    changes to the following when VAR = REPLACE:

    /FILE ABC.REPLACE..XYZ     COMMENT

Symbol Replacement with Multiple Symbol Values

If you want to replace a symbol with multiple values when a job is activated numerous times concurrently, you must use P-SUFFIX to identify the variable to be replaced. This is the variable you entered in the Suffix Symbol field in the Job Master Definition window (see the field description in the section Job Maintenance).

For information on defining multiple symbol values, see the symbol functions !MV or ?MV and !MM or ?MM described in the section Functions for Symbol Replacement.

Note:
If Suffix Symbol contains no values, then the multiple job is activated as a temporary dummy job.

You can obtain a specific occurrence of a multiple-value symbol by using the symbol function !MV or ?MV delivered with Entire Operations.

Symbol Replacement in Subnetworks

To be able to enter symbols in subnetworks as well, you can attach a symbol table to the main network; this table contains all symbols to be queried in the jobs of the subnetwork(s). At the same time, the symbol tables can be linked to the corresponding jobs of the subnetwork(s) by means of symbols whose values are not to be retrieved. After symbol entry, this creates active symbol tables attached to the main network.

On the job level, Entire Operations tries to load the symbols from the level(s) above if a symbol with the corresponding symbol table is not found, for example from the active symbol table of the main network. Entire Operations does not create active symbol tables on subnetwork job levels as the run numbers are not yet known at the time of the main network's activation and as symbol prompting is activated first.