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 submission 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 submission escape character.

This document covers the following topics:


Symbol Escape Characters

In JCL and Natural macro sources, the symbols to be substituted 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 at 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).

  • Submission Escape Character

    Symbols preceded by the submission escape character (also called 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 Default Setting 1 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 or 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.

This section covers the following topics:

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), § (section sign) and @ (commerical at sign) because they have 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 section describes the options provided to define your default activation and submission escape characters.

  • Default Settings

    The Default Setting (1) screen of the Entire Operations Defaults function (see the Administration documentation) is used to define the default for all networks in your Entire Operations environment.

    You can also define the default escape characters for each operating system class by using PF10 (OSpec) on the Default Settings (1) screen.

  • 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 substituted must be preceded by an escape character.

    You can define default escape characters in Entire Operations JCL or 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 replaces the current activation escape character in the current file. This replacement has an effect on symbol replacement only, not a meta statement defined in a macro (Natural statement). The #EOR-ESC-ACT meta statement is removed from the active JCL after loading.

    The #EOR-ESC-SUB = submission-character meta statement is evaluated during job submission. submission-character replaces the current submission escape character in the current file. This replacement has an effect on symbol replacement only, not a meta statement defined in a macro (Natural statement). The #EOR-ESC-SUB 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.

    Note about Trigraphs:

    Trigraph encoding uses question marks (?) as escape characters in the JCL definition. You can avoid decoding conflicts by switching trigraph encoding off and on in the JCL as described in Trigraph Encoding for JCL Submission on UNIX and Windows.

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 output the current status of the symbols on a printer.

Start of instruction setTo modify and confirm symbols and print the active symbol table

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

    A Symbol Prompting for Table screen similar to the example below appears:

      29.10.10               ***** Entire Operations *****                    09:48:36
      Owner    EXAMPLE       Symbol Prompting for Table EXAM-ST1
      Network  E62-NET                              Run 261   on 29.10.10 at 09:46
      ------------------------------------------------------------------------------
      C  Symbol               Value
      _  CLASS                G____________________________________________________
      _  JOBLIB               EOR.EXAMPLE.LOAD_____________________________________
      _  MSGCLASS             X____________________________________________________
      _  PARM-1               8888_________________________________________________
      _  STEPLIB              EOR.EXAMPLE.LOAD_____________________________________
      _                       _____________________________________________________
      _                       _____________________________________________________
      _                       _____________________________________________________
      _                       _____________________________________________________
      _                       _____________________________________________________
      _                       _____________________________________________________
      _                       _____________________________________________________
      _                       _____________________________________________________
      _                       _____________________________________________________
      H  Help   L  Long Value
      ******************************** Bottom of Data ******************************
     Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
                       End         Accpt Cncl  Up    Down

    The screen lists all the symbols requiring prompting in the symbol table and their values. The symbol values are taken from the corresponding master symbol table. The line commands and special PF keys are explained in the following section.

    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.

    Notes:

    1. Values which are longer than 40 characters can only be modified using the line command L. Direct field processing is not allowed for these values.
    2. 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. When you have made all desired modifications, press PF5 (Accpt) to confirm symbol prompting and accept all symbols for this activation.

    If there are several screens of symbols, **** more **** appears in the bottom line.

    Press PF8 (Down) to display more symbols until you get to the last screen. You can then accept all symbols by pressing PF5.

  3. If Symbol Printing after Prompting is set to Y in your user profile (see Reporting Functions in the Administration documentation), you are then asked to print the symbols (see also . A window similar to the example below opens in which you can enter the printer name:

    +-------------------------------------------+
    !                                           !
    !   Printing of Prompted Symbols            !
    !                                           !
    !             Printer Selection             !
    !                                           !
    !       Please enter printer: ________      !
    !                                           !
    !  Entr Continue   PF3 End   PF6 Cncl       !
    !                                           !
    +-------------------------------------------+
  4. Enter the printer name in the field Please enter printer.

  5. Press ENTER to output the symbols on the selected printer.

    If you do not want to print the symbols, press PF3 (End) to return to the Symbol Prompting for Table screen. PF6 (Cncl) cancels the network activation.

    If you generally do not want to print the symbols or display the above window, enter N for the function Symbol Printing after Prompting in the Reporting Functions window of your User Definition and Profile settings. For more information, see the section User Definitions and Profile Settings in the Administration documentation.

  6. Press PF5 (Accpt) when you are finished.

Line Commands: Symbol Prompting
Line Command Description
H Display help text for the symbol.
L Enter a value longer than 40 characters and modify other symbol parameters.

See also Entering Long Symbol Values and Modifying Active Symbols.

Special PF Keys: Symbol Prompting
PF Key Name Function
PF3  End  Cancel symbol prompting and restore to former status.
PF5  Accpt  Accept all symbols for this activation and continue with the activation.

If the list of prompted symbols exceeds one screen, scroll to the end of the list with PF8 first, before using PF5.

PF6  Cncl  Cancel this activation.

If symbol prompting is done during a network or job activation, the corresponding activation is cancelled.

Otherwise, only symbol prompting itself is cancelled.

PF7  Up  Scroll back to the top of the symbol list.
PF8  Down  If **** more **** appears in the bottom line, you can display more symbols by scrolling down with PF8. You must press this key to get to the last screen and accept all symbols with PF5.

Displaying Help Text for a Prompted Symbol

Start of instruction set To display a short help text for a prompted symbol

  1. Type H in the line command input field of the appropriate symbol on the Symbol Prompting for Table screen.

  2. Press ENTER. A window opens with a short help text explaining the symbol.

Cancelling Symbol Prompting

Start of instruction set To cancel symbol prompting

  • Press PF6 (Cncl).

Repeating Symbol Prompting

Start of instruction set To repeat symbol prompting from the beginning

  • Press PF6 (Cncl) to cancel the current network or job activation. Start the activation again.

Entering Long Symbol Values and Modifying Active Symbols

If a symbol value is longer than the 40 characters on the Symbol Prompting for Table screen, you can enter another 40 characters (up to a maximum of 120) in the Active Symbol Modification window. This window also allows you to modify other symbol parameters. See also Note for Long Symbol Values.

Start of instruction set To enter long symbol values and modify active symbols

  • Enter L in the line command input field of the appropriate symbol on the Symbol Prompting for Table screen. Press ENTER.

    An Active Symbol Modification window similar to the example below opens:

    +---------------------------------------------------------------+
    |                                                               |
    |                    Active Symbol Modification                 |
    |                                                               |
    |  Symbol Table P185905___                   Owner REQUEST      |
    |       Version (unnamed)_                 Network P185905      |
    |                                              Run 6            |
    |  Symbol  Name LONG1___________________________________        |
    |        Format A                                               |
    |         Value xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx        |
    |               xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx        |
    |               xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx        |
    |         Be careful with insertions or deletions.              |
    |         The lines will be concatenated to one symbol value.   |
    |                                                               |
    |     Prompting A                          Update Mode _        |
    |   Prompt Text ________________________________________        |
    |               ________________________________________        |
    |               ________________________________________        |
    |               ________________________________________        |
    |               ________________________________________        |
    | Enter-PF1---PF2---PF3-----PF5----PF8----PF9---PF10---PF11--   |
    |       Help  Add   End     Save   ---    Mult  ---    ---      |
    +---------------------------------------------------------------+

    This window allows you to modify the symbol value. The lines of the Value field are concatenated for the long symbol value.

    Caution:
    Be careful with insertions and deletions, since the lines of Value are concatenated to one symbol value.

This section covers the following topics:

Fields: Active Symbol Modification

The fields in the Active Symbol Modification window are identical to the fields in the Master Symbol Addition window. For field descriptions, see Fields: Master and Active Symbols.

Special PF Keys: Active Symbol Modification

For a description of special PF key functions, see Special PF Keys: Master Symbol Addition.

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 set To specify a user exit for symbol modification

  1. On the Network Maintenance screen, type M in the line command field of the network for which symbol prompting is to be defined. Press ENTER.

    A Network Modification window opens with the current values for the network.

  2. Press PF8 (SP-UR).

    A Symbol Prompting Exit window similar to the example below opens:

    +---------------------------------------------------+
    |                                                   |
    |              Symbol Prompting Exit                |
    |                                                   |
    |  Symbol Prompting for this network will be        |
    |  done by                                          |
    |           Natural Library ==> ________            |
    |                      Exit ==> ________            |
    |         Modification                              |
    |         without Prompting ==> _ (Y/N/B)           |
    |                                                   |
    |  PF1 Help PF3 End PF4 Edit PF5 Refr PF9 Delete    |
    +---------------------------------------------------+

    Enter the name of the user exit you want to use for symbol prompting. The fields and special PF keys available are described in Fields: Symbol Prompting User Exit.

This section covers the following topics:

Fields: Symbol Prompting User Exit

The input fields of the Symbol Prompting Exit window 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.
Modification without Prompting Symbol modification option(s).

Possible input values:

N A prompt window opens (default).

You are asked to modify or confirm symbols defined for prompting for the active symbol table.

See also Example of an Active Symbol Table List.

Y No prompt window opens.

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

B 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.

Special PF Keys: Symbol Prompting Exit

You can perform the following functions from the Symbol Prompting Exit window using these PF keys:

PF Key Name Function
PF4 Edit Edit the defined symbol prompting user exit.
PF5  Refresh Force an update of the user exit in the internal exit directory.
PF9  Delete  Delete the definition of the symbol prompting user exit. This does not delete the exit itself.

Example of an Active Symbol Table List

The following is an example of an output file generated for an active symbol table using Entire Operations 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 submission 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.

Symbol Table Type Description

Search
Order

JA

(Job active)

Active symbol table referenced by the active job. 1
NA

(Network, active)

Active symbol table referenced by the network. 2
CA

(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 operation can repeat recursively ascending.

3
CN

(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 operation can repeat recursively ascending.

4
JM

(Job master)

Symbol table referenced by the job master. 5
NV

(Network version)

Symbol table referenced in the network version. 6
OD

(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
SD

(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, job master or active job (usually with PF7), you will get a list of all usable symbol tables for this object in the above hierarchical order.

Actions Triggered for Missing Symbols

The following actions are triggered as soon as a symbol cannot be found in any symbol table:

A message is written to the log

A message is written to the system log file (see Log Information), for example:

Symbol XYZ not found
... Symbol Table EXAMPLE/SYMTAB1

The logged symbol table (here: SYMTAB1) is the first symbol table searched upward in the symbol table hierarchy. Example: If no symbol table has been defined at the job level, the symbol table defined for the network is logged.

A global message is sent

A symbol not found message containing the name of the searched symbol table is sent if the Global Message Sending Exit (see the Administration documentation) is enabled in your environment.

A global message is saved in the event store

An appropriate message including the name of the searched symbol table is saved in the event store if the Symbol not found and Event Store options of the Global Messages for Events function (see the Administration documentation) are enabled in your environment.

The problem is handled by a global user exit

A user exit takes action for the missing symbol to resolve the problem and continue processing if the Global Symbol Not Found Exit (see the Administration documentation) is defined and enabled in your environment.

Current processes are aborted

Current operations (for example, JCL loading) are terminated if a problem with missing symbols cannot be resolved.

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.
Column 71 contains a comma (,) and the columns 72 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.
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 end with one of the following delimiter characters:

blank ( ), comma (,), semicolon (;),
period (.), apostrophe ('), 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.

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 Definition (Master) 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.