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:
Editing Active JCL in the section Active Job Networks
This section covers the following topics:
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.
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.
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.
File names in Windows can be written in an alternative notation if
the backslash character (\) is not available, like in mainframe
environments.
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.
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:
ETC-PROFILE contains the value Y and if the
symbol ENV contains the name of a profile script.
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.
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.
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
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.
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:
| 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.
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).
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).
See Special Editor Commands for Macro Sources.
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:
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: See also Bulk Execution of MACRO Commands. |
TEST |
Generate JCL for testing purposes. The
generated JCL is displayed in a new window.
Notes:
|
- Run Number used for the TEST Command
The reserved run number used during the
TESTcommand is-3. DuringTEST, a temporary active symbol table with this run number is used. This avoids any influence on the defined master symbol table. In the log display, this reserved run number is not displayed.
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.
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.
You can use four 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.
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:
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
STEPLIBNOP.SYSF.DEV.LOADCLASSKMSGCLASSX- Natural System Variables
*DEVICEBATCH*INIT-USEREORMON
- Variables from the Parameter Section
P-NETWORKEX131AP-JOBEX-1-24P-OWNERSNWhen 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 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 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 can be used within macro JCL to set a
master symbol and its value from a local variable or string.
The symbol is set in the master symbol table 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.
Text strings must not contain blanks.
Blanks are used as separators for the parameters of
#GET-SYMBOL and #SET-SYMBOL.
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 master symbol 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 master
symbol TAGYYMMDD.
|
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:
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 LOCLocation
NATNatural text object.
This is the only location which is currently allowed for text objects.
LIBLibrary of the text object. MEMName 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-INCLstatement.
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 ("
").
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.
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.
- Example 1:
... #EOR-INCL LOC=NAT LIB=JCLLIB MEM=§OBJECT ...Include the Natural text object the name of which is in the symbol
OBJECTfrom 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
BLOCK1from the library USERLIB. The parametersDBIDandTEXT-1are passed to the text object with different values for the two invocations.
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.
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.