Symbol Replacement

#### Search Results

Search

# 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

- Symbol Prompting during Network or Job Activation

- Displaying Descriptions of Prompted Symbols

- Repeating Symbol Prompting

- Specifying User Exits for Symbol Modification

- Rules and Restrictions for Symbol Replacement

## 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 symbol table master).

  - 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

- Defining Escape Characters

### Recommended Escape Characters

We recommend that you use the following escape characters:

Operating System | Escape Characters
--- | ---
z/OS | `§` (section sign) and `$` (dollar 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 influences 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 influences 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 must 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 to replace symbols during network activation. Standard symbol prompting is not used in jobs of the type `NET` (subnetworks).

If any of the activated jobs are jobs with JCL location `MAC` or jobs of the type `JOB` 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.

Notes:

1. Up to 100 different symbol tables can be prompted during a network activation.
2. The message `EOR1830 - More than :1: Symbol Tables in Network` will be shown as a warning if the network uses more symbol tables. In this case, some symbol table might not be prompted. If symbol table versions are used, the determination of the current symbol table version might not work properly.
3. 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.

To 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 like 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 symbols defined for prompting during network activation. The symbol table master that contains the symbols is indicated in the screen title (here: `EXAM-ST1`).

2. You can add new symbols, modify existing symbol values or leave them unchanged.

   If you want to change symbol parameters not shown in the symbol list of the Symbol Prompting for Table screen (for example, the format of a symbol) or if the symbol value exceeds the length of the Value field (maximum input is 53 characters), enter the line command `L` (Long Value) next to the required symbol. A Symbol Active Modification window opens then. The fields and special functions provided in this window are explained in Fields: Symbol and Special PF Keys: Symbol.

   The columns contained on the screen are explained in Columns: Symbol Prompting. The commands provided on the screen are explained in Line Commands: Symbol Prompting and Special PF Keys: Symbol Prompting.

   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.

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

4. 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. (If you do not want to print the symbols or open the Printing window, change this setting to `N`.)

   A Printing window like the example below opens:

       +-------------------------------------------+
       !                                           !
       !   Printing of Prompted Symbols            !
       !                                           !
       !             Printer Selection             !
       !                                           !
       !       Please enter printer: ________      !
       !                                           !
       !  Entr Continue   PF3 End   PF6 Cncl       !
       !                                           !
       +-------------------------------------------+

5. Enter a printer name and press ENTER to output the symbols on the specified printer.

   If you do not want to print the symbols, choose ENTER or PF3 to close the window and activate the network. PF6 (Cncl) cancels the network activation.

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

   The Symbol Prompting for Table screen disappears and an Entire Operations message at the top of the screen indicates that network activation has started.

The new symbol 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.

This section covers the following topics:

- Columns: Symbol Prompting

- Line Commands: Symbol Prompting

- Special PF Keys: Symbol Prompting

#### Related Topic:

- Symbol Prompting for Network Starts in the section Schedule Maintenance

### Columns: Symbol Prompting

The columns of the Symbol Prompting for Table screen are explained in the following table:

Column | Description
--- | ---
C | One-character line command input field. For possible commands, see Line Commands: Symbol Prompting.
Symbol | Name of the symbol defined for prompting.
Value | Value of the symbol defined for prompting.

### Line Commands: Symbol Prompting

The following line commands are available on the Symbol Prompting for Table screen:

Line Command | Description
--- | ---
`H` | Display the descriptive text of the selected symbol, if available. See also Displaying Descriptions of Prompted Symbols.
`L` | Open the Symbol Active Modification window for the selected symbol to enter a long value and/or modify other symbol parameters (for example, the format). The fields in the window are described in Fields: Symbol.

### Special PF Keys: Symbol Prompting

The Symbol Prompting for Table screen provides the following special PF keys:

PF Key | Name | Function
--- | --- | ---
PF3 | End | Cancel symbol prompting and restore symbols.
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 the activation of a network or job, 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 choose this key to get to the last screen and accept all symbols with PF5.

## Displaying Descriptions of Prompted Symbols

To display the description defined for a prompted symbol

- On the Symbol Prompting for Table screen, type `H` in the line command input field of the symbol whose description you want to display.

  Press ENTER.

  A window like the example below opens:

      +--------------------------------------------------------------+
      |                                                              |
      |  Symbol Table ===> EXAM-TABLE              Owner SAGTEST     |
      |  Symbol  Name ===> NEWSYMBOL                                 |
      |                                                              |
      |   Prompt Text ===> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  |
      |                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  |
      |                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  |
      |                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  |
      |                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  |
      |                                                              |
      +--------------------------------------------------------------+

  It shows the descriptive text defined for the selected symbol.

  Text is only available if it has been entered in the Prompt Text field of a symbol definition described in Fields: Symbol.

## Repeating Symbol Prompting

To repeat symbol prompting from the beginning

1. Choose PF6 (Cncl) to cancel the current network or job activation.

2. Start the activation again.

## 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 prompt 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.

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 like 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

- Special PF Keys: Symbol Prompting Exit

- Example of an Active Symbol Table List

### 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:

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

- Symbol Table Types and Symbol Search Order

- Actions Triggered for Missing Symbols

- Nested Replacement

- Symbol Replacement in JCL

- Import/Export Restrictions

- Escape Character

- Indicator for End of a Symbol Name

- Symbol Replacement Algorithm

- Fixed Positions within a JCL Line

- Symbol Replacement with Multiple Symbol Values

- Symbol Replacement in Subnetworks

#### Related Topic:

- Predefined Symbols

### 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 user-defined symbol table master, 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 the 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
`NO` (Network, active, other symbol tables) | Other active symbol tables of the active network. These may have been created by symbol setting by API into a symbol table which is not defined on job or network level. | 3
`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 in ascending order. | 4
`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 in ascending order. | 5
`JM` (Job master) | Symbol table referenced by the job master. | 6
`NV` (Network version) | Symbol table referenced in the network version. | 7
`OD` (Owner default) | Symbol table master `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. | 8
`SD` (System default) | Symbol table master `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. | 9

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 the usable symbol tables for this object in the hierarchical order described above.

### 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

Symbols can be used within other symbols (nested).

For nested replacement of symbols, the following rules apply:

- On the top level, only the escape character defined for the job or network is checked and replaced.

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

- If the submission escape character is used on a nested level, submission and activation escape characters are replaced on deeper levels.

> Example of Nested Replacement

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

> Example of Nested Symbol Replacement in JCL

>       /* 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.

### Symbol Replacement in JCL

For symbol replacement in JCL submitted on mainframes (z/OS and BS2000), the following particularities apply:

Column 72 contains one blank and the columns 73 to 80 contain digits. | 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. | 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. | 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 import or export operations 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 and Example of Nested Symbol Replacement in JCL.

### 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 nested symbol replacement (symbols within symbols) possible.

### Fixed Positions within a JCL Line

This section 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 the 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 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`.

### Symbol Replacement in Subnetworks

If you want 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 table 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.

### On this page

- Symbol Escape Characters
- Symbol Prompting during Network or Job Activation
- Displaying Descriptions of Prompted Symbols
- Repeating Symbol Prompting
- Specifying User Exits for Symbol Modification
- Rules and Restrictions for Symbol Replacement