Editing Master JCL and Natural Sources

#### Search Results

Search

# Editing Master JCL and Natural Sources

The editor Entire Operations provides to create, display or modify sources is an adapted version of the Software AG Editor.

This section provides information on editing JCL and Natural source objects.

By editing the master JCL, you change the master definition that affects each future executed active job.

This document covers the following topics:

- General Editing Considerations

- UNIX and Windows: Handling of Tab Characters (H'09') within JCL Lines

- Starting an Edit Session

- Common Editor Commands

- Handling Macro Sources for Dynamic JCL Generation

- Usage of Text Objects in JCL

- Locking of Natural Sources

#### Related Topics:

- Editing Active JCL in the section Active Job Networks

## General Editing Considerations

This section covers the following topics:

- Automatic Logon to the Operating System Server

- Logon to a Node

- z/VSE: Editing JCL from z/VSE/POWER RDR

- Windows: File Names

- UNIX and Windows: Text Files

- UNIX: Usage of Profile Scripts

- z/OS: JES2 /* ROUTE Statement

### Automatic Logon to the Operating System Server

Before JCL is edited, Entire Operations checks whether the user may access the JCL file. If it is an operating system file, then an automatic logon with the defined JCL user ID (BS2000 and UNIX and Windows) is performed, if required. If this automatic logon fails (e.g., if a password is required), an appropriate message is displayed. In this case, the user must first logon to the corresponding operating system server.

### Logon to a Node

While editing the master JCL, an implicit logon is triggered to establish the connection to the required node. The logon is not prompted if you have already logged on to this node within this session.

For further information, see the logon function described in the section Using Entire Operations.

### z/VSE: Editing JCL from z/VSE/POWER RDR

You can edit a unique member with `DISP=L` only. After issuing the editor `SAVE` command, the edited member is submitted to the RDR queue. The old member is deleted. If you create a new member, a default `JOB` statement is created.

### Windows: File Names

File names in Windows can be written in an alternative notation if the backslash character (`\`) is not available, like in mainframe environments.

### UNIX and Windows: Text Files

If a file to be edited or loaded as JCL is not a text file, the error message `EOR0325 - No Text File` is returned. For JCL loading, this is treated as a permanent error.

### UNIX: Usage of Profile Scripts

Entire Operations determines usage of profiles in non-login UNIX scripts (as they are submitted by Entire Operations) during submission of the shell script as described in the following section:

- The Entire Operations Monitor checks whether the symbol `ETC-PROFILE` exists in the symbol table of the active job, or in another symbol table in the standard symbol search hierarchy, up to SYSDBA/A.

  - If the symbol `ETC-PROFILE` is found and if it contains the value `Y`, the frame script (job.current.sh) sources the profile script(s) executed in the currently running shell (other scripts are not sourced). These scripts are retrieved from /etc/profile and /etc/profile.local.

  - The user script (job.current.frame.sh) locates the environment variables of the profile script being set.

- The Entire Operations Monitor checks whether the symbol `ENV` exists in the symbol table of the active job, or in another symbol table in the standard symbol search hierarchy, up to SYSDBA/A.

  - If the symbol `ENV` is found and contains a value, its content is assumed to be a profile script like $HOME/.profile.

  - If a profile script exists, its name is assigned to the environment variables `ENV` and `BASH_ENV` by the frame script (job.current.sh).

  - The frame script (job.current.frame.sh) sources the profile script.

  - The user script (job.current.sh) locates the environment variables of the profile script being set.

For more information on `ETC-PROFILE` and `ENV`, see the section Reserved Symbols for Profile Scripts (UNIX).

Notes:

1. Several profile scripts can be sourced sequentially if the symbol `ETC-PROFILE` contains the value `Y` and if the symbol `ENV` contains the name of a profile script.
2. The user is responsible to make the used profile scripts proof against multiple execution, e.g., by using the PROFILEREAD variable like in Linux.

### z/OS: JES2 /* ROUTE Statement

If a z/OS JES2 JCL contains a statement

`/* ROUTE XEQ target`

the job executes on the `target` target machine.

As long as the SYSOUT is passed back to the submission machine, the running job is not accessible. Entire Operations detects a rerouting, and behaves differently for such jobs.

For rerouted z/OS jobs, some features do not work, for example:

- Direct execution tracking.

- Browsing of SYSOUT while the job is executing.

- Cancelling.

However, if SYSOUT is available again, all End-of-Job checking and End-of-Job actions can be performed.

## UNIX and Windows: Handling of Tab Characters (H'09') within JCL Lines

- If a master or active JCL is edited, each tab character is converted to a single blank before the editing. This prevents strange effects during editing. The JCL is written back without tab characters in any case.

- Extended logging, JCL logging: for the extended logging of JCL tab characters are also converted to blanks.

- If Entire Operations is running on a mainframe, the middleware translation tables convert tab characters to blanks anyway. This means that each UNIX and Windows JCL is submitted without tab characters.

- If Entire Operations is running on UNIX or Windows, tab characters remain in master and active JCL, as long as the master or active JCL is not edited from within Entire Operations.

## Starting an Edit Session

This section describes how to edit JCL and Natural sources including user exits.

To edit JCL of a standard operating system job or a Natural source

1. Type `E` in the line command field of the selected job in the Job Maintenance screen. Press ENTER.

   Or:
   In the Job Definition (Master) window, choose PF4 (Edit).

   The Entire Operations editor screen appears showing the first page of the JCL or Natural source as shown in the following examples.

   (If the selected job has no JCL or Natural source object defined, a blank editor screen appears.)

   - Example of JCL for the location `PDS` (partitioned data set):

          Edit NOP.EXAMPLE.JCL(NOPE02J3)-------------------------------- Columns 001 072
          ====>                                                          Scroll===> CSR
          ***** ****************************** top of data *****************************
          00001 //NOPE02J1 JOB @UID,CLASS=@CLASS,MSGCLASS=@MSGCLASS,MSGLEVEL=(1,1)
          00002 //* ***************************************************************
          00003 //* IF STEP02 IS NOT EXECUTED
          00004 //* THEN CONDITION 'E02-J01-OK'  ==> JOB 'E02-J02' WILL BE EXECUTED
          00005 //* ELSE CONDITION 'E02-J01-NOK' ==> JOB 'E02-J03' WILL BE EXECUTED
          00006 //* END-IF
          00007 //* ***************************************************************
          00008 //JOBLIB  DD    DSN=@JOBLIB,DISP=SHR
          00009 //STEP01   EXEC  PGM=NOPCONTI
          00010 //*STEP02   EXEC  PGM=NOPCONTI,PARM='U202'
          00011 //
          ***** **************************** bottom of data ****************************

         Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
               Help        End   Quit  Rfind Rchan Up    Down  Symbo Left  Right Curso

     The example above shows the JCL member `NOPE02J3` contained in the data set `NOP.EXAMPLE.JCL`.

   - Example of JCL for the job location `MAC` (macro Natural source):

          EDITNAT:SYSEORU(E51-M01)->Subprogram->Struct->Esc:'@'--------- Columns 001 072
          ====>                                                          Scroll===> CSR
          ***** ****************************** top of data *****************************
          ==msg -caution- profile changed to "caps off" (from "caps on") because data
          ==msg contains lower case characters.
          00010 @ DEFINE DATA PARAMETER USING NOPXPL-A
          00020 @ LOCAL     /* LOCAL VARIABLES START HERE
          00030 @ 1 #JOBNAME   (A10)
          00040 @ 1 #DATE      (D)
          00050 @ 1 #WEEKDAY   (A10)
          00060 @ END-DEFINE
          00070 @ * ----------------------
          00080 @ MOVE P-JOB TO #JOBNAME
          00090 @ EXAMINE #JOBNAME FOR '-' DELETE
          00100 @ MOVE P-ACTIVATION-TIME TO #DATE
          00110 @ MOVE EDITED #DATE (EM=N(10)) TO #WEEKDAY
          00120 //EORE51J1 JOB  ,@P-OWNER,MSGCLASS=@MSGCLASS,CLASS=@CLASS
          00130 //*
          00140 //STEP01   EXEC PGM=NOPCONTI,PARM='C=0000,T=00:00:10'
          00150 //STEPLIB  DD   DISP=SHR,DSN=@STEPLIB
          00160 @ IF #WEEKDAY = 'Wednesday'
          00170 //* -- THIS STEP IS EXECUTED ON WEDNESDAYS ONLY --
          00180 //WEDNESDY EXEC PGM=NOPCONTI,PARM='C=0004,T=00:10:00'
          00190 //STEPLIB  DD   DISP=SHR,DSN=@STEPLIB
          00200 @ END-IF
          00210 //*
          ***** **************************** bottom of data ****************************

         Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
               Help        End   Quit  Rfind Rchan Up    Down  Symbo Left  Right Curso

     The example above shows the macro Natural source `E51-M01` contained in the Natural library `SYSEORU`.

     For details on using macro sources and special editor commands, see Handling Macro Sources for Dynamic JCL Generation.

2. Write or edit the JCL or Natural source as required using Entire Operations editor commands and PF keys.

   You can also write or edit JCL or a Natural source outside Entire Operations by using another editor available at your installation.

   Use the appropriate PF keys or editor commands to navigate through the source and edit the text. See Special PF Keys: Editor Screen and Handling Macro Sources for Dynamic JCL Generation.

   The Entire Operations online help facility provides brief information on the main Entire Operations editor commands and features. The Software AG Editor is described in detail in the Editors documentation of Natural for Mainframes.

This section covers the following topics:

- Special PF Keys: Editor Screen

### Special PF Keys: Editor Screen

PF Key | Name | Description
--- | --- | ---
PF4 | Quit | Leave the source unchanged and exit the editor.
PF5 | Rfind | Place the cursor on the next occurrence of the search string specified with the `FIND` editor command (for example: `FIND search-string`).
PF6 | Rchan | Replace the next occurrence of the text string specified with the `CHANGE` editor command (for example: `CHANGE search-string new string`).
PF7 | Up | Scroll up in the source.
PF8 | Down | Scroll down in the source.
PF9 | Symbo | Open the Usable Symbol Tables window to select a symbol table for browsing or modification. See also Listing Usable Symbol Tables in the section Symbol Table and Symbol Maintenance.
PF10 | Left | Scroll left in the source.
PF11 | Right | Scroll right in the source.
PF12 | Curso | Place the source line entered at the editor command prompt at the top of the source. You can omit leading blanks.

The editor commands mentioned in the table and the complete command syntax that applies are described in detail in the Software AG Editor section in the Editors documentation of Natural for Mainframes.

## Common Editor Commands

- Editor SAVE Command

- Editor STOW Command for NAT Locations

- Editor MACRO and TEST Commands for MAC Locations

### Editor SAVE Command

If you have edited JCL of the location `PDS`, `NAT` or `MAC`, you can save the source held in the source area of the editor by using the following editor command:

    SAVE

You can save the JCL as a new member of the same file or library by using the syntax:

    SAVE	member-name

For example: `SAVE MEMBER`

This editor command corresponds to the Natural `SAVE` system command (see the Natural System Commands documentation).

### Editor STOW Command for NAT Locations

JCL of the location `NAT` must be compiled before it can be processed by a job.

If you have edited JCL of the location `NAT`, you can save and compile the source held in the source area of the editor by using the following editor command:

    STOW

This editor command corresponds to the Natural `STOW` system command (see the Natural System Commands documentation).

### Editor MACRO and TEST Commands for MAC Locations

See Special Editor Commands for Macro Sources.

## Handling Macro Sources for Dynamic JCL Generation

Jobs with the JCL location `MAC` (macro Natural source) use the edit macro function of Entire Operations, which allows the use of variables anywhere in the JCL. Dynamic generation of JCL refers to the automatic substitution of these variables with their current values either when the job network is activated or when the job is submitted. The same job can thus have different JCL for different activation.

Dynamic JCL can be defined for jobs using the edit macro function of Entire Operations. Use the JCL import function in the job definition with JCL location as `NAT` (Natural source) to convert existing JCL to the Entire Operations macro language format.

The MACRO editor command must be used to generate the final JCL. The TEST editor command can be used to test the generated JCL.

This section covers the following topics:

- Special Editor Commands for Macro Sources

- Escape Character for Natural Source Lines

- Parameter List

- Variables in Dynamically Generated JCL

### Special Editor Commands for Macro Sources

The following special editor commands are available for a macro source:

Command | Description
--- | ---
`MACRO` | Compile the macro JCL into an executable Natural object. This object is executed by Entire Operations during JCL load. It generates the executable active JCL. (This command is similar to the `STOW` command used for standard Natural programs.) Note The `MACRO` command can be executed in batch mode, e.g., for whole networks. See also Bulk Execution of MACRO Commands.
`TEST` | Generate JCL for testing purposes. The generated JCL is displayed in a new window. Notes: The macro source is not saved during execution of the `MACRO` command. The generated object is not compiled with the Natural `STOW` command during execution of the `TEST` command. Since no changes are made to the original macro source and the existing generated object, the `TEST` command can also be performed by users who have read access only for the macro source.

> Run Number used for the TEST Command

>   The reserved run number used during the `TEST` command is `-3`. During `TEST`, a temporary active symbol table with this run number is used. This avoids any influence on the defined symbol table master. In the log display, this reserved run number is not displayed.

### Escape Character for Natural Source Lines

Natural source lines must be preceded by the activation escape character of the job (see Symbol Escape Characters in the section Symbol Table and Symbol Maintenance).

The activation escape character at the beginning of a line distinguishes the line as a Natural statement from the JCL. The use of Natural statements provides full Natural functionality in dynamic JCL, including access to Adabas and Entire System Server. This means you do not need to learn any special control statements. All Natural statements used in dynamic JCL must be coded in structured mode.

Variables are user-defined and can be used in any part of the JCL. Variables are distinguished in the JCL by preceding them with an escape character: the activation escape character denotes variables to be substituted at activation time; the submission escape character denotes variables to be substituted at job submission time (see Symbol Escape Characters in the section Symbol Table and Symbol Maintenance).

Note
These escape characters can be changed by the system administrator. However, this should only be done if absolutely necessary, for example for countries with a different alphabet. It is not advisable to use escape characters which have a defined meaning in a particular operating system or which are already defined as escape characters, e.g., `$` in BS2000 or UNIX.

### Parameter List

Each JCL for a job with the JCL location `MAC` (macro Natural source) must start with the declaration of the common user exit parameter list `NOPXPL-A`:

    § DEFINE DATA PARAMETER USING NOPXPL-A

where the first character (here: `§`) is the activation escape character of the job.

The `P-CALL-PLACE` parameter in `NOPXPL-A` contains the value `MAC`.

See also Common User Exit Parameter Data Area NOPXPL-A and User Exit Types, P-CALL-PLACE in the section User Exits.

### Variables in Dynamically Generated JCL

You can use these types of variables:

- A variable from the symbol table specified for the job;

- A variable from the parameter section (`P-...`);

- A local variable defined in this Natural program, which can be computed in your program (`L-...`);

- A Natural system variable (`TIME`, `DATE`, etc.) which is distinguished by an asterisk (`*`), for example, `*TIME` and `*DATE`;

- The variables `*TIMN`, `*TIMN6`, `*TIMA6` and `*TIMA7` which will be handled as described in the Table of Predefined Symbols.

Note
All variables with prefixes other than `P-`, `L-` or `*` are assumed to be found in the symbol table. Symbol replacement itself (without embedding Natural statements) is also available for standard JCL (`JOB` (Standard Job) type jobs). See Symbol Replacement in the section Symbol Table and Symbol Maintenance.

This section covers the following topics:

- Sample JCL
- #GET-SYMBOL
- #SET-SYMBOL
- #SET-SYMBOL-M
- General Notes
- Examples of Using #GET-SYMBOL, #SET-SYMBOL and #SET-SYMBOL-M

#### Sample JCL

The following sample JCL illustrates the use of variables in the dynamically generated JCL of a job with JCL location `MAC` (macro Natural source):

    § DEFINE DATA PARAMETER USING NOPXPL-A
    § LOCAL    /* ... ALL LOCALS SHOULD START WITH 'L-'
    § 1 L-01    (A30)
    § 1 CLASS   (A01)     /* FROM SYMBOL TABLE, FOR #GET-SYMBOL
    § END-DEFINE
    § * ------------------------------------
    #GET-SYMBOL CLASS
    § COMPRESS P-NETWORK P-JOB INTO L-01
    //SNNOPEX  JOB  ,§P-OWNER,MSGCLASS=§MSGCLASS,CLASS=§CLASS
    //STEP01   EXEC PGM=NOPCONTI,PARM='C=0004'
    //STEPLIB  DD   DISP=SHR,DSN=§STEPLIB
    //* DEVICE: §*DEVICE, INIT-USER: §*INIT-USER, TIME: §*TIME
    //* L-01  : §L-01
    § IF CLASS = 'K'      /* SYMBOL USED IN STATEMENT -> #GET-SYMBOL
    //* THE CLASS IS §CLASS
    § ELSE
    //* ANOTHER MSGCLASS FOUND
    § END-IF
    //*

The variables used in the JCL are assumed to have the following current values:

> Symbol Table Variables

>   `STEPLIB` | `NOP.SYSF.DEV.LOAD`
>   `CLASS` | `K`
>   `MSGCLASS` | `X`

> Natural System Variables

>   `*DEVICE` | `BATCH`
>   `*INIT-USER` | `EORMON`

> Variables from the Parameter Section

>   `P-NETWORK` | `EX131A`
>   `P-JOB` | `EX-1-24`
>   `P-OWNER` | `SN`

>   When the job is activated, Entire Operations substitutes the variables with their current values. The following JCL is generated as a result:

>       //SNNOPEX  JOB  ,SN,MSGCLASS=X,CLASS=K
>       //STEP01   EXEC PGM=NOPCONTI,PARM='C0004'
>       //STEPLIB  DD   DISP=SHR,DSN=NOP.SYSF.DEV.LOAD
>       //* DEVICE: BATCH, INIT-USER: EORMON
>       //* L-01  : EX131-A EX-1-24
>       //* THE CLASS IS K
>       //*

#### #GET-SYMBOL

`#GET-SYMBOL` can be used within macro JCL to put an active symbol value into a local variable.

The symbol is taken from where it is found first in the symbol search path.

The syntax is as follows:

    #GET-SYMBOL variable [value]

`value` is optional. If it is not specified, the variable is filled with the contents of a symbol with the same name.

`value` must be of the format A (alphanumeric). To convert `value` to a numeric field, use the Natural `VAL` system function.

    #GET-SYMBOL variable(index)

With this syntax, an instance of a multiple value symbol can be obtained. The variable must be defined as a local array with a sufficient array size.

Example:

    #GET-SYMBOL L-SYMBOL(L-IND)

See also Examples of Using #GET-SYMBOL, #SET-SYMBOL and #SET-SYMBOL-M.

#### #SET-SYMBOL

`#SET-SYMBOL` can be used within macro JCL to set an active symbol and its value from a local variable or string.

The symbol is set in the active symbol table which belongs to the active job.

For `#SET-SYMBOL`, a job must have a locally defined symbol table.

The syntax is as follows:

    #SET-SYMBOL symbol [value]

`value` is optional and can contain one of the following values:

Value | Meaning | Example
--- | --- | ---
none | Set the value of the symbol `symbol` to the content of a local variable with the name `symbol`. |
    #SET-SYMBOL S1
`'text'` | Set the value of the symbol `symbol` to `'text'`. |
    #SET-SYMBOL S2 'v002'
`variable` | Set the value of the symbol `symbol` to the content of the local variable with name `variable`. |
    #SET-SYMBOL S3 S30

See also Examples of Using #GET-SYMBOL, #SET-SYMBOL and #SET-SYMBOL-M.

#### #SET-SYMBOL-M

`#SET-SYMBOL` can be used within macro JCL to set a symbol master and its value from a local variable or string.

The symbol is set in the symbol table master which belongs to the active job.

For `#SET-SYMBOL-M`, a job must have a locally defined symbol table.

The syntax is as follows:

    #SET-SYMBOL-M symbol [value]

`value` is optional and can contain the same values as described for `#SET-SYMBOL`.

See also Examples of Using #GET-SYMBOL, #SET-SYMBOL and #SET-SYMBOL-M.

#### General Notes

Text strings must not contain blanks.

Blanks are used as separators for the parameters of `#GET-SYMBOL` and `#SET-SYMBOL`.

#### Examples of Using #GET-SYMBOL, #SET-SYMBOL and #SET-SYMBOL-M

The activation escape character used in the examples is the paragraph sign (`§`).

Statement | Description
--- | ---
`#GET-SYMBOL J` | Move the contents of symbol `J` to the local variable `J`.
`#GET-SYMBOL #J §BB` | Move the contents of symbol `BB` to the local variable `#J`.
`#GET-SYMBOL #J '§BB'` | Move the contents of symbol `BB` to the local variable `#J`.
`#GET-SYMBOL L-MULT '§?MV<M1,§I>'` | Move the result of a symbol function call into the local variable `L-MULT`.
`#SET-SYMBOL J` | Set the active symbol `J` to the contents of the local variable `J`.
`#SET-SYMBOL I #A` | Set the active symbol `I` to the contents of the local variable `#A`.
`#SET-SYMBOL AA 'text'` | Set the active symbol `AA` to the value `text`.
`#SET-SYMBOL BB §I` | Set the active symbol `BB` to the contents of symbol `I`.
`#SET-SYMBOL BB '§I'` | Set the active symbol `BB` to the contents of symbol `I`.
`#SET-SYMBOL CC '§D.§E'` | Concatenate symbol values of `D` and `E`, and put the result into the active symbol `CC`.
`#SET-SYMBOL-M DD 'value'` | Set the symbol master `DD` to the value `value`.
`#SET-SYMBOL-M TAGYYMMDD '&!D<T,YYMMDD>'` | Sets the result of the symbol function `&!D<T,YYMMDD>` (e.g. `150211`) into the symbol master `TAGYYMMDD`.

## Usage of Text Objects in JCL

You can include text objects in JCL. The text objects can have their own local parameters. Text objects can invoke other text objects, i.e., nesting is possible.

This feature is not limited to jobs with JCL location `MAC` (macro Natural source), but can also be used from within standard JCL.

This section covers the following topics:

- Inserting Text Objects into JCL

- Parameters for Included Text Objects

- Nested (Recursive) #EOR-INCL Statements

- Replacement of Parameters within the Text Object

- Examples of #EOR Statements

### Inserting Text Objects into JCL

You can insert Natural text objects anywhere in your JCL.

The meta commands described here are stripped from the active JCL and the submitted JCL.

The syntax is as follows:

    #EOR-INCL LOC=NAT LIB=library MEM=text-object

> Parameters of the #EOR-INCL Statement

>   Parameter | Description
>   --- | ---
>   `LOC` | Location `NAT` Natural text object. This is the only location which is currently allowed for text objects.
>   `LIB` | Library of the text object.
>   `MEM` | Name of the text object.

>   If the text object cannot be read, the JCL generation is aborted with an error message.

>   Symbol replacement is possible within the `#EOR-INCL` statement.

### Parameters for Included Text Objects

You may invoke included text objects with specific parameters.

For each parameter you want to pass to the text which is included by a `#EOR-INCL` statement, you must code a `#EOR-PARM` line in front of the `#EOR-INCL` statement.

These parameters are in effect only for the text included (and all nested inclusions) in the following `#EOR-INCL` statement.

The syntax is as follows:

    #EOR-PARM parameter = value [parameter = value]...

Multiple parameters can be passed on the `#EOR-PARM` line. This is limited by the line size.

Parameter values implicitly have the format A (alphanumeric).

Parameter values may contain blanks. In this case, they must be included in apostrophes (`' '`) or double quotes (`" "`).

### Nested (Recursive) #EOR-INCL Statements

You may use nested `#EOR-INCL` statements inside text objects which have already been included. These nested inclusions may have their own parameter lists.

Note
Be aware that the total number of inclusions for JCL is limited by the Natural editor buffer size for the Natural task executing.

### Replacement of Parameters within the Text Object

Parameters for text objects can be used within the included text object like any other symbol. They have precedence over the symbols of the current symbol table of the job (and the other symbol tables in the search hierarchy).

Therefore, parameters for included text objects can temporarily override symbols with the same name. The scope of a parameter is only the included text object, and the text objects which are invoked from within this text object by nested calls.

The lifetime of parameters defined via `#EOR-PARM` is JCL load time only. Normal symbol replacement can be used within included text objects like everywhere else in the JCL.

### Examples of #EOR Statements

> Example 1:

>       ...
>       #EOR-INCL LOC=NAT LIB=JCLLIB MEM=§OBJECT
>       ...

>   Include the Natural text object the name of which is in the symbol `OBJECT` from the library JCLLIB.

> Example 2:

>       ...
>       #EOR-PARM DBID = 9
>       #EOR-PARM TEXT-1 = "a string with blanks"
>       #EOR-INCL LOC=NAT LIB=USERLIB MEMBER=BLOCK1
>       //* JCL statement
>       #EOR-PARM DBID = 10
>       #EOR-PARM TEXT-1 = "another string"
>       #EOR-INCL LOC=NAT LIB=USERLIB MEMBER=BLOCK1
>       ...

>   Include the Natural text object `BLOCK1` from the library USERLIB. The parameters `DBID` and `TEXT-1` are passed to the text object with different values for the two invocations.

## Locking of Natural Sources

If you start Natural with the profile parameter `SLOCK` set to `PRE`, a lock avoids that two or more users can concurrently edit a Natural source object from an Entire Operations, an Entire Operations GUI Client or within a native Natural environment.

If `SLOCK` is set to `POST` or `OFF`, no locking is performed but the Entire Operations editor detects that several users edit a source at the same time.

You can use the Natural system command `UNLOCK` to check or unlock locked Natural source objects.

For detailed information on `SLOCK` and `UNLOCK`, refer to the relevant sections in the Natural Parameter Reference documentation.

#### Additional Prerequisites for Source Locking

- In a UNIX or Windows environment, the Natural Development Server must be installed in the current Natural FNAT system file.

- If you want to avoid concurrent source editing among users in a local Entire Operations GUI Client environment, in addition to Natural, you also have to start the Natural RPC server with `SLOCK` set to `PRE`.

### On this page

- Editing Master JCL and Natural Sources
- General Editing Considerations
- UNIX and Windows: Handling of Tab Characters (H'09') within JCL Lines
- Starting an Edit Session
- Common Editor Commands
- Handling Macro Sources for Dynamic JCL Generation
- Usage of Text Objects in JCL
- Locking of Natural Sources