Reformatting, Enforcement, and Site Standards Verification
The reformatting, enforcement, and site standards features ensure that JCL statements comply with enterprise standards, by applying predefined rules.
This chapter includes the following topics:
Introduction
The reformatting, enforcement, and site standards features ensure that JCL statements comply with required enterprise standards. The user defines rules that specify the required formats, values, or standards, and then runs Control-M JCL Verify to apply the rules. The rules are independent of each other and are invoked separately.
The rules are based on an event-action triggering process using ON (for detecting events) and DO (for performing actions) statements. This mechanism is similar to the one implemented in other IOA products such as Control-M (CMEM), Control-M/Tape, and Control-O.
For each rule the user defines one or more
-
ON statements - to specify what events trigger the process
-
DO statements - to specify what actions are taken after the process is triggered
There are several available types of ON statements, described later in the chapter, each of which handles a specific JCL statement type (for example, JOB, EXEC, and DD) or other JCL parameter.
ON statements have a set of one or more selection fields for matching the appropriate rule to the JCL statements requiring testing.
DO statements are contained in a DO block, which supports a set of commands and built-in functions.
The data, from JCL statements or external resources (such as member name, library name, and environment) is stored in variables by the system. The user can also define temporary variables and store data in them.
For overviews of the various available types of rules, see
For a guide to which interfaces and utilities to use for the various rule tasks, see Creating, managing, and applying rules.
Site standards (STDR) overview
To test for compliance to enterprise standards, the user defines rules that incorporates the site standards and runs Control-M JCL Verify to test whether the JCL statements actually comply with the standards.
The site standards rules are saved in the site standards library, OLPREFJ.RULES. The list for the site standard rules, CTJRULE, is located in the OLPREFJ.PARM library.
Reformatting (REF) overview
The reformatting process is a standalone process, which functions independent of the validation process. The reformatting is performed on the original JCL statements, depending on the user's preferences. The reformatting process can be performed on procedures. The rules can reformat the following parts of JCL statements:
-
statement type - by specifying the column where the type begins
-
positional parameters - by specifying the columns where the first parameter begins and the last parameter ends, and the maximum number of parameters in the JCL record
-
keywords - by specifying the columns where the first keyword begins and the last keyword ends, the maximum number of parameters in the JCL record, and the order that the keywords appear in the JCL record
-
comments - by specifying the column where the comment begins
-
continuations - by specifying the column where the continuation begins
The rules do not reformat JCL records that are
-
added by Control-M
-
part of in-stream data
-
added by procedures and includes
The reformatting is performed after
-
Control-M resolution for JCL (AutoEdit variables are not resolved)
-
validation of JCL syntax
-
the enforcement process (if the enforcement also required at the same run - relevant only for batch execution)
The RFBRKEY parameter in CTJPARM controls reformatting when the rightmost column specified in a rule is reached while processing keyword positional subparameters.
Before formatting:
DISP=(NEW,CATLG,DELETE)
When RFBRKY=Y (default)
-
Remaining subparameters are moved to a new line, in accordance with the reformat rule.
-
After reformatting:
-
DISP=(NEW,
-
CATALG,..
When RFBRKEY=N
-
The reformat rule for positional parameters (if any) is ignored, and subparameters are not moved to a new line, except when column 71 is reached.
-
After reformatting:
DISP=(NEW,CATLG,DELETE)
The reformatting rules have a selection criteria through which the users can choose on which member, job name, and library the rule will be invoked.
The reformatting rules are saved in the rule library, OLPREFJ.REFRULES. The list for the reformatting rules, CTJRREF, is located in the OLPREFJ.PARM library.
Rule samples are provided for JOB, EXEC, and DD statements.
Enforcement (ENF) overview
The enforcement rules can be activated to enforce values for labels, positional parameters, and keywords in the JCL statements. The enforcement process can be performed on procedures. The rules can remotely change JCL values in other systems.
The rules do not enforce values in JCL records that are
-
added by Control-M
-
part of in-stream data
-
added by procedures and includes
-
before the JOB record
The enforcement is performed after
-
Control-M resolution for JCL (AutoEdit variables are not resolved)
-
validation of JCL syntax
The enforcement rules have a selection criteria through which the users can choose on which member, job name, and library the rule will be invoked.
The enforcement rules are saved in the rule library, OLPREFJ.ENFRULES. The list for the enforcement rules, CTJRENF, is located in the OLPREFJ.PARM library.
Rule sample is provided for the INIT statement.
Creating, managing, and applying rules
Rules are created and edited using the Rule Definition Facility (JR screen), as described in Defining rules online and Rule Definition Facility. The JR screen is accessed through the IOA online interface as described in Control-M JCL Verify Rule Definition Facility (JR screen).
After creating a table of rules, the user must add the table name to the appropriate rule list member in order for it to be loaded afterwards for processing JCL statements.
Each type of rule has a different rule list member in the OLPREFJ.PARM library. For the site standards rules, the rule list is the CTJRULE member; for the Reformat rules, the rule list is the CTJRREF member; and for the Enforcement rules, the rule list is the CTJRENF member.
Once the user has added the table name to a rule list member, the table rule will be loaded, either when the monitor is restarted or by the operator command of /F CTJMON,REF,SCOPE=RULES .
Loading and removing rules
Rules can be loaded (refreshed) and removed from the environment using the Control-M JCL Verify monitor. For more detailed information, see Improving Performance.
Refreshing or removing rules, can be performed for the three types of rules, using the following commands:
To load the rules
F ctjmon,REFRESH,SCOPE=RULES
To remove the rules
F ctjmon,REMOVE,SCOPE=RULES
where ctjmon is the name of the Control-M JCL Verify monitor.
Applying rules to libraries
Rules for verification, reformatting, and enforcement processes can be applied to entire libraries or individual members, by using the Control-M JCL Verify Facility (JV screen).
For more information, see Online JCL Processing from IOA and Control-M Interfaces.
Using the CTJXVER edit macro
The verification, reformatting, and enforcement processes can be invoked using the CTJXVER edit macro.
For more information, see CTJXVER Edit Macro.
Reformatting and enforcement using CTJENR
The CTJENR batch utility is capable of performing the reformatting and enforcement processes on regular JCL statements.
For more information, see CTJENR - JCL Job Reformatting and Enforcement in the INCONTROL for z/OS Utilities Guide.
Using REXX EXECs
The user can call REXX EXECs, and Control-M JCL Verify functions and variables can be used in the REXX EXEC for site standards and enforcement.
For more information, see Using REXX EXECs.
Using the Control-M JCL Verify API
The Control-M JCL Verify Application Program Interface can apply rules for the verification, reformatting, and enforcement processes.
For more information, see The Control-M JCL Verify Application Program Interface (API).
Rule selection and searching
Rule selection fields
The rules which are used in the job processing are selected based on the following selection fields:
-
environment - can be optionally assigned to rules, limiting the processing to only those rules in which the particular environment name is specified.
-
common selection fields - common to all the various ON statements, such as JOBNAME, LIBRARY, and MEMBER.
-
event selection fields - specific to particular ON statements, such as CLASS, USER, and ACCOUNT.
The wild card characters, such as the masks using asterisk (*) and the question mark (?), which are commonly used in IOA, can be used in the selection fields.
If a selection field is left blank it is equivalent to specifying an asterisk, and that field will be eliminated from the selection process.
Rule search criteria
When a JCL statement requires testing, reformatting, or enforcement a search is performed to locate the appropriate rule. Since different rules can be defined with similar selection fields, it is possible that more than one rule will match a JCL statement. Therefore, rules are searched and used according to the criteria in the following order:
-
priority - Each rule is defined with a priority from 1 to 99. The rules with the higher priority (larger number) are searched first. The default priority is 50.
-
environment - a specified environment will be invoked before the GENERAL environment.
-
level of detail - Rules in which the selection fields are defined with more specific details are searched first. For example, DSN=A.B.* is more specific than DSN=A.* when a dataset with the name of A.B.C is processed.
-
continuity - Each rule is defined with a setting that determines whether to continue searching for additional rules that meet the selection criteria. A setting of N (No) stops the search for additional rules. Relevant only for site standards.
Variables
Variables are data objects which are available to the user in the rules. The user can keep data in them in order to pass information from one rule to another.
The following types of variables are available:
General system variables
General system variables are variables that get their value by JVER when the processing begins. The user cannot update them using the SET command. All the system variables begin with %%# to differentiate them from the other variable types.
The system variables are available to all the rules. The system variables and the date system variables are described separately in the following two tables.
Tab.JV.3.3 System variables
Variable |
Description |
---|---|
%%#JCLTYPE |
The type of JCL statement (for example, DD, EXEC, and JOB). |
%%#MEMBER |
The JCL statements member name. |
%%#LIBRARY |
The library name containing the JCL member. |
%%#ENVRN |
The environment specified in the invocation. |
%%#SCHDLIB |
The scheduling library with the job definition (if verifying Control-M job definition). |
%%#SCHDTAB |
The scheduling table name (if verifying Control-M job definition) |
%%#SCHDJOB |
The scheduling job name (if verifying Control-M job definition) it will be equal to %%#MEMBER. |
%%#STATNUM |
The statement number (after the procedures and Control-M cards are added). During INIT the value of %%#STATNUM is set to zero. |
%%#DDJOB |
The number of DD in job. |
%%#STPJOB |
The number of steps in job. |
%%#STPJOBO |
The number of steps in job, not including steps added by the resolved procedures |
%%#LINJOB |
The number of lines/records in job. |
%%#DDSTP |
The number of DDs in step. |
%%#REQUSER |
The user ID of the one who performed the validation, Reformat, or Enforcement process. |
%%#RULENAME |
Name of the rule that is invoked. |
%%#RULETBL |
Name of the rule table that is invoked. |
%%$RC |
The highest return code attained up until the current point in the procedure. The format is: RETURN RC 0000 RS X' 0000 ' |
%%$RS |
The highest reason code attained up until the current point in the procedure. Expressed in HEX code. The format is: |
%%$JCL# |
Under site standard rules: Total number of lines in the member (including in-stream data sets) and the number of lines from the expanded procedures and included JCL. The total number equals the number of lines in the JVER batch output minus all JVER messages. The value of JCL# can change from one execution to the next due to changes in the external procedures or included JCL. Under Enforcement/Reformat rules: Total number of lines in the original JCL. |
%%$JCLn |
Under site standard rules: The nth line in the JVER output, as described above. Up to 72 characters in the record. The value of JCLn can change from one execution to the next due to changes in the external procedures or included JCL. Under Enforcement/Reformat rules: The nth JCL line in the original JCL. |
%%$JCLCURF |
Resolves to the index of the first JCL card of the current JCL statement that corresponds to the current ON for which the current rule has been triggered. Under Enforcement/Reformat rules, only the original JCL cards are included. |
%%$JCLCURL |
Resolves to the index of the last JCL card of the same statement. Under Enforcement/Reformat rules, only the original JCL cards are included. |
%%$MEMTYPE |
Resolves to the JCL type, either PROC or JOB. |
%%#INPNODE |
INPut NODE: The NODE parameter as specified by the user in the parameters provided for the verification/enforcement/reformat request. |
%%#INPSYSTEM |
INPut SYSTEM: The SYSTEM parameter as specified by the user in the parameters provided for the verification/enforcement/reformat request. |
%%#INPIOAENV |
INPut IOAENV: The IOAENV/IOA ENV parameter as specified by the user in the parameters provided for the verification/enforcement/reformat request. |
%%#INPAR |
INPut AR: The AR/AUTO ROUTE parameter as specified by the user in the parameters provided for the verification request. If AR/AUTO ROUTE=D or unspecified then the value that is specified by the CTJPARM AROUTE parameter is used and shown. |
%%#REQIOAENV |
REQuest IOAENV: The QNAME where the verification/enforcement/reformat request was originated. |
%%#REQSYSTEM |
REQuest SYSTEM: The name of the SYSTEM where the verification/enforcement/reformat request was originated. |
%%#REQCTJMON |
REQuest CTJMON: The name of the CTJMON where the verification/enforcement/reformat request was originated. |
%%#SUBIOAENV |
SUBmission IOAENV: The QNAME where the verification/enforcement/reformat request was submitted. |
%%#SUBSYSTEM |
SUBmission SYSTEM: The name of the SYSTEM where the verification/enforcement/reformat request was submitted. |
%%#SUBCTJMON |
SUBmission CTJMON: The name of the CTJMON where the verification/enforcement/reformat request was submitted. |
%%#EXEIOAENV |
EXEcution IOAENV: The QNAME where the verification/enforcement/reformat request was executed. |
%%#EXESYSTEM |
EXEcution SYSTEM: The name of the SYSTEM where the verification/enforcement/reformat request was executed. |
%%#EXECTJMON |
EXEcution CTJMON: The name of the CTJMON where the verification/enforcement/reformat request was executed. |
%%$CMNTn |
Resolves to the comment card of the corresponding number. Available only for ON INIT rules.
%%$CMNTn system variables cannot be changed with a DO ENFORCE command. To change a comment card, use the DO REPCMNT command. |
Given the following JCL:
//MYJOB JOB
//* THIS IS MY JOB
//S1 EXEC PGM=IEFBR14
//DD1 DD DSN=USER.LIB.CNTL,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=U,BLKSIZE=6144,DSORG=PO),
// DSNTYPE=LIBRARY,
// UNIT=3390,
// VOL=SER=IFBQ25,
// SPACE=(TRK,(1,,1))
When ON DD is invoked for DD1, the values of the variables will be:
%%$JCLCURF = 4
%%$JCLCURL = 10
Tab.JV.3.4 Date system variables
Variable |
Description |
---|---|
%%$DATE |
The current system date, in the format yymmdd. |
%%$ODATE |
The current ODATE (when invoked from a Control-M interface). The current ODATE (when invoked from a Control-M interface). |
%%$CENT |
The first two digits in the current year |
%%$DAY |
The current system day, in dd format. |
%%$JULDAY |
The current system day, in jjj format. |
%%$MONTH |
The current system month, in mm format. |
%%$RDATE |
The installation current working date, in yymmdd format. |
%%$RDAY |
The installation current working day, in dd format. |
%%$RJULDAY |
The installation current working day of the year, in jjj Julian format. |
%%$RMONTH |
The installation current working month, in mm format. |
%%$RWDAY |
The current working day of the week, in d format, where d is 1 through 6 or 0. For example, 1=Sunday, 2=Monday, ...6=Friday, 0=Saturday. |
%%$RYEAR |
The installation current working year, in yy format. |
%%$TIME |
The time of day, in hhmmss format. |
%%$WDAY |
The current Gregorian day of the week in d format, where d is from 1 through 6 or 0. For example, 1=Sunday, 2=Monday, ...6= Friday, 0=Saturday. |
%%$YEAR |
The current system year, in yy format. |
Card data variables
Data variables are variables that contain data from the JCL card. For each JCL statement, there is a set of predefined variables representing the parameters of the specific JCL statement type. All the card data variables begin with %%$ to differentiate them from the user variables. The variables that are available with each JCL card are discussed in the relevant ON statement for each JCL card type later in the chapter.
Card data variables are available in the rule that processed them and in all the following rules until the same card is processed (and then the variables are set with the new card data).
If the data variable is not referenced in the card processed, the variable value would be set to null.
For example, the data from the JOB card is available to all the following cards in the job. The data from the EXEC card is available to all the DD cards that follow it until it is replaced with the next EXEC card data (which in turn would be available for all the DD cards that follow it).
User-defined variables
These variables are defined by the SET commands that are included in the DO section of the rules. The variable names begin with %%. The variables are available to all the rules used during the JCL verification and are deleted when the job verification ends.
User defined variables are available to all the rules that follow the rule that define them (in the first rule that has a SET command for the variable). For example, a variable defined by a SET command that processed the EXEC cards is available to all the DD cards that follow it, to all the EXEC cards that follow it, but not to the JOB cards that precede it.
The scope of user defined variables are on a "job - level." The variables are deleted after the job verifications are completed.
The length of user local variables for the rules is limited to 12 characters, including the %% characters at the beginning.
Defining rules online
The selection criteria and instructions defined for each rule are called rule parameters. This section briefly describes the rule parameters and their specific uses. For more information about the specific parameters, see Parameter Descriptions.
The rule parameters are defined in the Rule Definition facility. As an example, the Rule Definition screen for site standards is shown in the following figure. For more information about the Rule Definition facility, see Rule Definition Facility.
Fig.JV.3.1 Site Standard Rule Definition Screen
- CONTROL-M/JCLVERIFY RULE: TESTENV TABLE:
TABLE1 COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| RULE ENVIRONMENT PRIORITY CONTINUE SEARCH |
| DESC |
| DESC |
| =========================================================================== |
| JOBNAME |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB O/N |
| =========================================================================== |
| ON |
| =========================================================================== |
| O N T Y P E S: |
| |
| INIT END |
| JOB INCLUDE JCLLIB |
| EXEC PROC STEPEND |
| DD DDSYSIN DDSYSOUT |
| =========================================================================== |
| DO |
| =========================================================================== |
| D O T Y P E S: |
| |
| IF ELSE RETURN ENDIF SET MSG REXX |
| WHILE ENDWHILE ADJMSG |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: EDIT DOOPT ONOPT CANCEL 16.38.45
The rule panel is divided into the following sections:
-
identification fields
This section includes the rule name and its description. These fields are used for display purposes only, but have no effect on the rule logic. This section also includes the environment field, which is used in the rule selection criteria, the rule priority, and the continue search indicator.
-
common selection fields
This section includes the selection fields that are common to all the various ON types. Several selection blocks can be specified with Or/Not relationships.
-
ON definition
This section includes the ON statement. The ON defines the reason for the rule invocation. In most of the cases the reason is the processing of a JCL statement. The section can hold more than one ON statement (an empty row is opened once the preceding one is used - similar to other IOA panels). Once the ON statement is specified, the specific ON selection fields (if any) is added to the panel. Refer to the rules selection fields section above. The specific selection fields for each ON statement are discussed in the relevant ON section later in this document. Several selection blocks for the ON specific fields can be specified with Or/Not relationships.
-
available ON statements
This section simply lists the available ON statements from which the user can choose. This section can be hidden using the ONOPT command (or the short ON command), which allows the user to toggle between the hidden and displayed states of the section.
-
DO definition
This section includes the DO statement. The DO defines what action will be performed if the rule is triggered. The rule is triggered when the ON "event" has occurred and all the rule's selection fields match. The different DO statements are described in detail later in this document. The section can hold more than one DO statement (an empty row is opened once the preceding one is used).
-
available DO statements
This section simply lists the available DO statements from which the user can choose. This section can be hidden using the DOOPT command, which allows the user to toggle between the hidden and displayed states of the section.
All parameter definitions are stored as members in the olprefj.RULES, olprefj.ENFRULES, and olprefj.REFRULES libraries. The Control-M JCL Verify term for a member of this type is "rule table." Each table is composed of parameters for a number of different rules, all of which usually relate to the same subject. Maintenance of tables in the library and management of rules in each table is performed using the Online Rule Definition facility.
Rule definition parameters fall into the following basic categories:
-
General Parameters - general information.
-
Common Selection Parameters - common selection conditions.
-
Event Selection Parameters - event selection conditions.
-
Action Parameters - actions to be performed.
Following is a brief summary of the parameters in each of these categories. For a detailed description of all the rule definition parameters (in alphabetical order), see Parameter Descriptions.
General Parameters - Summary
General parameters provide general information about the rule and to provide certain criteria for rule selection. The General parameters are shown below.
Table 7 General Parameters
Parameter |
Description |
STDR |
ENF |
REF |
---|---|---|---|---|
RULE |
Name of a rule as specified in the entry panel. |
Y |
Y |
Y |
ENVIRONMENT |
Name of the environment where the rule applies. |
Y |
Y |
Y |
PRIORITY |
Specifies the priority of the rule. |
Y |
Y |
Y |
CONTINUE SEARCH |
Specifies whether additional rules will be searched and used. |
Y |
N |
N |
SHOW ORIGINAL |
Specifies whether to print the original statement in the report as a message appearing before the changed statement. |
N |
Y |
Y |
DESC |
Free-text description of the rule definition. |
Y |
Y |
Y |
Common Selection Parameters - Summary
Common Selection parameters, which are common to all the various ON parameter types (see Event Selection Parameters), specify which JCL statements will trigger the processing to be performed by Control-M JCL VerifyControl-M JCL Verify. Several selection blocks can be specified with Or/Not relationships. The Common Selection parameters are shown below.
Tab.JV.3.5 Common Selection Parameters
Parameter |
Description |
STDR |
ENF |
REF |
---|---|---|---|---|
JOBNAME |
Name of the job (as appears in the JOB statement). |
Y |
Y |
Y |
LIBRARY |
Name of the library where the JCLs reside. This is also the MEMLIB, if invoked from a Control-M/EM interface. |
Y |
Y |
Y |
MEMBER |
Name of the member name in the library. This is also the MEMNAME, if invoked from a Control-M/EM interface. |
Y |
Y |
Y |
SCHDLIB |
Name of the scheduling library when invoked from a Control-M/EM interface. |
Y |
N |
N |
SCHDTAB |
Name of the scheduling table when invoked from a Control-M/EM interface. The name does not refer to "folder" since "table" is still the term used with Control-M for z/OS. |
Y |
N |
N |
O/N |
Conjunctional subparameter that permits linking of common selection statements. Valid values are:
|
Y |
Y |
Y |
Event Selection Parameters - Summary
Event Selection parameters (ON parameters) specify which job events or JCL statements will trigger the processing to be performed by Control-M JCL Verify. Valid ON parameters are shown below.
Tab.JV.3.6 Event Selection Parameters (ON Parameters)
Parameter |
Description |
STDR |
ENF |
REF |
---|---|---|---|---|
ON INIT |
Specifies that the rule is triggered when a JCL job is about to be processed. Used to initialize user variables (for example, counters). |
Y |
Y |
N |
ON JOB |
Specifies that the rule is triggered by a JOB statement. Used for the JOB statement. |
Y |
Y |
Y |
ON EXEC |
Specifies that the rule is triggered by an EXEC statement. Used for the EXEC statement. |
Y |
Y |
Y |
ON DD |
Specifies that the rule is triggered by a DD statement. Used for the DD statement. |
Y |
Y |
Y |
ON END |
Specifies that the rule is triggered when a JCL job is ending. Used, for example, for cross JCL validations and counter checking. |
Y |
Y |
N |
ON STEPEND |
Specifies that the rule is triggered when a JCL step is ending. Used, for example, for cross JCL validations and counter checking. |
Y |
Y |
N |
ON INCLUDE |
Specifies that the rule is triggered by an INCLUDE statement. Used for the INCLUDE statements. |
Y |
Y |
Y |
ON PROC |
Specifies that the rule is triggered by a PROC statement. Used for the PROC statements. |
Y |
Y |
Y |
ON DDSYSIN |
Specifies that the rule is triggered by a SYSIN DD statement (either DD * or DD DATA). Used for the SYSIN DD statements. Site standards differs from enforcement in that site standards will not be triggered by data instream, but will be invoked for the entire concatenated DDNAME. |
Y |
Y |
N |
ON JCLLIB |
Specifies that the rule is triggered by a JCLLIB statement. Used for the JCLLIB statements. |
Y |
Y |
Y |
ON DDSYSOUT |
Specifies that the rule is triggered by a SYSOUT DD statement set to a specific value. Used for the DD statement with SYSOUT equal to the specified value. |
Y |
Y |
N |
When you specify an ON parameter and press Enter, the subparameters for this ON parameter are displayed. The combination of an ON parameter and its subparameters is called an ON statement.
Multiple ON statements, of the same type, can be specified in a rule. The Or/Not conjunctional parameter is used to link two or more ON statements.
For a general explanation of event selection parameters, see ON DD: Event Selection Parameter.
Action Parameters - Summary
Action parameters (DO parameters) specify actions to be performed by Control-M/ JCL Verify. These actions are performed only after conditions specified in the Event Selection parameters have been fulfilled.
Boolean "IF" logic capabilities are provided using the DO IF, DO ELSE, or DO ENDIF statements, and repetition (loop) logic capabilities are provided using the DO WHILE and DO ENDWHILE statements.
The Action parameters are shown below.
Tab.JV.3.7 Action Parameters (DO parameters)
Parameter |
Description |
STDR |
ENF |
REF |
---|---|---|---|---|
DO IF |
Provide Boolean "IF" logic capability allowing for alternative actions to be performed. |
Y |
Y |
Y |
DO WHILE |
Enable use of repetition (loop) logic allowing for repeated DO actions for as long as a specified condition is met. |
Y |
Y |
Y |
DO RETURN |
Exits from the rule and returns to Control-M JCL Verify to continue with the next rule. |
Y |
Y |
N |
DO ENDSTMT |
Exits from the rule and continues with the next JCL statement. |
Y |
Y |
N |
DO QUITMEM |
Exits from the rule and continues with the next job or procedure. |
Y |
Y |
N |
DO REXX |
Calls user exit written in REXX. |
Y |
Y |
N |
DO SET |
Assigns a value to a user defined or AutoEdit variable. |
Y |
Y |
Y |
DO MSG |
Defines a message to be displayed in the output. |
Y |
Y |
Y |
DO ADJMSG |
Suppresses Control-M JCL Verify messages or changes their severity in a dynamic manner. |
Y |
N |
N |
DO ENFORCE |
Assigns a value to a variable to enforce in a JCL statement. |
N |
Y |
N |
DO IAFTER |
Inserts a new record after the current JCL statement. |
N |
Y |
N |
DO IBEFORE |
Inserts a new record before the current JCL statement. |
N |
Y |
N |
DO ICMNTB |
Inserts a new comment before a specified comment number. Available only for ON INIT. |
N |
Y |
N |
DO ICMNTA |
Inserts a new comment after a specified comment number. Available only for ON INIT. |
N |
Y |
N |
DO REPCMNT |
Replaces a specified comment number with a new comment. Available only for ON INIT. |
N |
Y |
N |
DO DELCMNT |
Deletes a specified comment number. Available only for ON INIT. |
N |
Y |
N |
DO DELREC |
Deletes the current JCL statement. |
N |
Y |
N |
DO COMMENT |
Specifies the starting position of a comment within a JCL statement. |
N |
N |
Y |
DO KEYWORDS |
Specifies the maximum number and column range of keywords in a JCL statement. |
N |
N |
Y |
DO POS |
Specifies the maximum number and column range of positionals in a JCL statement. |
N |
N |
Y |
DO ONTYPE |
Specifies the starting position of a JCL statement type (JOB, EXEC, DD) in the JCL statement. |
N |
N |
Y |
DO CONT |
Specifies the starting position of the continuation of a JCL statement. |
N |
N |
Y |
DO ARRANGE |
Specifies the order of the keywords in a JCL statement, according to a JCL statement type (JOB, EXEC, DD). |
N |
N |
Y |
For a general explanation of the automated console action parameters, see DO statement: Action Parameter.
Rule Definition Facility
The Control-M JCL Verify Rule Definition facility is composed of a series of screens that enable you to view, create, modify, and delete rule definitions and parameters.
Rule definitions under Control-M JCL Verify are stored as members in the olprefj.RULES, olprefj.ENFRULES, and olprefj.REFRULES libraries. The Control-M JCL Verify term for a member of this type is "rule table." Each table is composed of parameters for a number of different rules, all of which usually relate to the same subject. Maintenance of tables in the library and management of rules in each table is performed using the Online Rule Definition facility.
The Control-M JCL Verify Rule Definition facility does not support members which have been compressed using the ISPF PACK option.
The number of rule tables in the library, the number of rules in a table, and the size of each rule definition, are all calculated dynamically and are not dependent on parameter specification.
Accessing the Control-M JCL Verify Rule Definition Facility
The Control-M JCL Verify Rule Definition facility contains the screens shown below.
Tab.JV.3.8 Control-M JCL Verify Rule Definition Facility Screens
Screen |
Description |
---|---|
Control-M JCL Verify Rule Definition Entry Panel |
Allows specification of parameters which determine which screen is displayed. |
Control-M JCL Verify Rules - Table List screen |
Displays the list of tables (members) in the Control-M JCL Verify rule library. |
Control-M JCL Verify Rules - Rules of Table List screen |
Displays the list of rules in a specific rule table. |
Control-M JCL Verify Rule (definition) screen |
Displays the parameters of the selected rule. This screen is used to define, display and modify rule parameters. |
To enter the Rule Definition facility, select Option JR on the IOA Primary Option menu and press Enter. The entry panel is displayed.
For a more detailed description, see Control-M JCL Verify Rule Definition Facility (JR screen).
Creating Tables
Tables are created by specifying the new table name in the entry panel and pressing Enter. As a result, a skeletal rule definition (that is, one with most fields left blank) is displayed in the rule definition screen.
Fill in the blanks and save the screen entries. The table is created and the rule definition is the first and only definition in the Rule list of the table. As additional rule definitions are created in the table (described below), they are added to the list.
Upon exiting the Rule List screen, if changes were made in at least one rule definition, an Exit Option window is displayed. One field of the window displays the table name. This value can be changed to a new table name that creates a new table in which the rule definitions are saved.
Creating Rule Definitions
Rule definitions can be created using two basic methods
-
A skeletal rule definition can be created by specifying the name of a new rule definition in the entry panel. The table specified in the entry panel can be either a new or an existing table. In this case, virtually all fields of the rule definition are empty.
-
A copy of an existing rule definition can be created using the INSERT option (described in Options of the Rule List Screen) in the Rule List (Rules of Table: ABC) screen. In this case, most fields of the new rule definition have the same values as the fields in the copied rule definition.
Performing Operations on Tables and Rules
Many operations can be performed on tables and on the rule definitions in them. These operations are performed using commands and options in the various screens of the Rule Definition facility.
Following is a brief summary of some of the major operations possible within the facility. Additional options and commands are explained following the summary.
Accessing (Editing or Browsing) a Table and its Rules
A table (that is, the rule definitions in the table) can be browsed or edited.
When browsed, the table cannot be modified or updated. When the table is edited, new rule definitions can be added and existing rule definitions can be modified or deleted.
Browsing, however, has the following advantages:
-
Access and exit are quicker than in editing.
-
Rule lists and definitions that are in use by another user can be viewed.
-
Access for browsing might be granted, while though access for editing might be denied due to site security requirements.
To browse a table (and its rule list and rule definitions), use the BROWSE option in the Table List screen.
Specifying the table name in the entry panel or using the SELECT option in the Table List screen provides edit access.
Depending on user profile definitions, if the table requested for editing is in use, access is either granted in Browse mode, or access will not be granted.
Copying a Rule to Another Table
Rules can be copied from one table to another using the COPY option in the Rule List screen. For more information, see Copying Rules to another Table.
Deleting a Table or a Rule
Unneeded rules can be deleted using the DELETE option in the Rule List screen. For more information, see Options of the Rule List Screen. Unneeded tables can be deleted using the DELETE option in the Table List screen. For more information, see Deleting Tables.
Saving Modifications
All changes made to a table and its rule scheduling definitions are kept in memory until the table is exited. Upon exiting the table, the user can choose to save or cancel the changes. For more information, see Exiting the Rule List Screen.
Entry Panel
Overview
The entry panel is displayed upon entering the Rule Definition facility (Option JR in the IOA Primary Option menu).
Fig.JV.3.2 Rule Definition Facility Entry Panel
------------ CONTROL-M/JCL VERIFY RULE DEFINITION ENTRY PANEL -------(JR)
COMMAND ===>
SPECIFY TABLE NAME, RULE NAME, TYPE
TABLE ===> (Blank for table selection list)
RULE ===> (Blank for rule selection list)
TYPE ===> (Blank for site standards rules
ENF - for enforcement rules
REF - for reformatting rules)
USE THE COMMAND SHPF TO SEE PFK ASSIGNMENT 13.10.26
For information about how to access the Rule Definition facility and how to create or modify rules, see Control-M JCL Verify Rule Definition Facility (JR screen).
Search Window
To display the Search Window, do the following:
-
Type the rule name.
-
Leave the table name blank or type the table name using mask characters (* or ?).
-
Press Enter.
The Search window, illustrated in the following figure, allows the user to search for the specified rule in tables of the specified library. Tables in which the rule has been found are then displayed in the Table List screen.
Fig.JV.3.3 Rule Definition Facility Entry Panel Search Window
------------ CONTROL-M/JCL VERIFY RULE DEFINITION ENTRY PANEL -------(JR)
COMMAND ===>
SPECIFY TABLE NAME, RULE NAME, TYPE
TABLE ===> (Blank for table selection list)
RULE ===> (Blank for rule selection list)
TYPE ===> (Blank for site standards rules
ENF - for enforcement rules
REF - for reformatting rules)
+-----------------------------------------+
| |
| PLEASE SELECT ONE OF THE FOLLOWING: |
| |
| 1 - STOP SEARCH IMMEDIATELY |
| 2 - ASK AGAIN AFTER 000010 TABLES |
| 3 - UNCONDITIONAL SEARCH |
| |
| NUMBER OF TABLES IN LIBRARY: 000015 |
| NUMBER OF SEARCHED TABLES: 000000 |
| NUMBER OF SELECTED TABLES: 000000 |
| |
-------------------------------------------+
USE THE COMMAND SHPF TO SEE PFK ASSIGNMENT 13.10.26
To close the Search Window without performing any action, press PF03/PF15 (END).
To perform a search, select one of the following choices and press Enter:
3 - UNCONDITIONAL SEARCH
performs an uninterrupted search of all tables in the specified library. The search is stopped immediately when you select Option1.
2 - ASK AGAIN AFTER number TABLES
-
searches the specified number of tables in the specified library, and then pauses. (The search number can be modified. The default is10.)
-
Do one of the following:
-
Continue the search by pressing Enter.
-
Stop the search by selecting Option 1 - Stop Search Immediately.
-
If any tables are found, the Table List is displayed listing those tables.
During the search, the following information is displayed at the bottom of the window:
-
Number of tables in library - the total number of tables in the specified library
-
Number of searched tables - the cumulative number of tables searched
-
For example, if you perform three searches with a specified number of 10, the figure displayed is 30.
-
Number of selected tables - the cumulative number of tables selected that contain the rule being searched
If any tables are selected during the search, the Table List is displayed listing those tables. If no tables are selected, the Search Window is closed and a message is displayed.
Table List Screen
The Table List screen, which is shown in the following figure, displays a list of rule tables (members) in the specified library. You can enter this screen from the entry panel or when returning from the Rule List screen.
By default, only table names are listed in the screen. However, if the default has been modified at time of installation, statistical information is displayed with the table name (as shown in the following figure).
Fig.JV.3.4 Rule Definition Facility Table List Screen
T---------------- CONTROL-M/JCL VERIFY RULES - TABLES LIST ------------(JR)
COMMAND ===> SCROLL===> CRSR
OPT NAME -------- VV.MM CREATED CHANGED SIZE INIT MOD ID
$HASP 01.00 2013/02/06 2013/02/06 10:36 513 513 0 IOAPROD
COPYRULE 01.09 2013/02/03 2013/02/14 11:00 48 10 0 IOAPROD
COPYTEST 01.09 2012/12/24 2013/02/05 17:15 0 12 0 IOATEST
COPYTST 01.16 2013/02/04 2013/02/13 16:46 52 25 0 IOATEST
CTJRSAMP 01.00 2013/06/05 2013/06/05 12:00 1 1 0 IOATEST
DEMO1 01.03 2013/01/30 2013/02/03 15:28 22 11 0 IOAPROD
ENVNAME0 01.10 2013/01/30 2013/02/11 09:57 64 9 0 IOAPROD
CTD 01.09 2013/01/24 2013/02/13 16:42 25 15 0 IOA8000
CTM 01.08 2013/01/24 2013/01/27 14:23 14 7 0 IOA8000
CTO 01.08 2013/01/17 2013/02/04 18:26 57 13 0 IOA8000
DEVICES 01.06 2013/01/08 2013/01/20 11:03 17 11 0 IOA8000
NEWRULES 01.01 2013/01/29 2013/01/29 14:05 78 63 0 IOAPROD
NEWTBLR 01.01 2013/02/17 2013/02/17 21:06 15 11 0 IOATEST
ONDD 01.31 2012/12/10 2013/01/20 11:12 26 14 0 IOATEST
ONDDS 01.04 2013/01/16 2013/01/20 11:13 16 15 0 IOAPROD
ONEXEC 01.08 2012/12/10 2013/01/20 12:01 16 14 0 IOAPROD
SHUTSYS 01.11 2013/01/09 2013/02/17 22:04 37 12 0 IOAPROD
STARTSYS 01.20 2012/12/05 2013/02/13 23:54 66 11 0 IOAPROD
STATS 01.07 2012/12/10 2013/01/24 17:10 12 13 0 IOAPROD
OPTIONS S SELECT B BROWSE D DELETE 14.52.55
To scroll down the Table list, press PF08/PF20. To scroll up the Table list, press PF07/PF19.
To return to the entry panel, press PF03/PF15 (END).
Options of the Table List Screen
To request one of the following options, specify the option in the OPT field next to the table name, and press Enter.
Tab.JV.3.9 Options of the Table List Screen
Option |
Description |
---|---|
S(SELECT) |
Display the list of rules in the table for any purpose, including editing and modification. Only one table can be selected at a time. |
B(BROWSE) |
Display the list of rules in a table for purposes of browsing. Only one table can be selected at a time. |
D(DELETE) |
Delete the table (member) from the library. Multiple tables can be selected. |
The INCONTROL administrator can limit specific users so they can access only the BROWSE option.
To return to the entry panel, press PF03/PF15 (END).
Deleting Tables
To delete tables, type D by the table names and press Enter.
The confirmation window, shown in the following figure, is displayed, in sequence, for each table selected for deletion.
Fig.JV.3.5 Rule Definition Facility Delete Table Confirmation Window
T---------------- CONTROL-M/JCL VERIFY RULES - TABLES LIST ------------(JR)
COMMAND ===> SCROLL===> CRSR
OPT NAME --- +--------------------------+ E INIT MOD ID
$HASP | CONFIRM DELETE OPTION | 513 38 0 IOAPROD
D COPYRULE <-------| (Y/N) | 48 10 0 IOAPROD
COPYTEST +--------------------------+ 0 12 0 IOAPROD
COPYTST 01.16 2013/02/04 2013/02/13 16:46 52 25 0 IOATEST
CTJRSAMP 01.00 2013/06/05 2013/06/05 12:00 1 1 0 IOATEST
DEMO1 01.03 2013/01/30 2013/02/03 15:28 22 11 0 IOAPROD
ENVNAME0 01.10 2013/01/30 2013/02/11 09:57 64 9 0 IOAPROD
CTD 01.09 2013/01/24 2013/02/13 16:42 25 15 0 IOA8000
CTM 01.08 2013/01/24 2013/01/27 14:23 14 7 0 IOA8000
CTO 01.08 2013/01/17 2013/02/04 18:26 57 13 0 IOA8000
DEVICES 01.06 2013/01/08 2013/01/20 11:03 17 11 0 IOA8000
NEWRULES 01.01 2013/01/29 2013/01/29 14:05 78 63 0 IOAPROD
NEWTBLR 01.01 2013/02/17 2013/02/17 21:06 15 11 0 IOATEST
ONDD 01.31 2012/12/10 2013/01/20 11:12 26 14 0 IOATEST
ONDDS 01.04 2013/01/16 2013/01/20 11:13 16 15 0 IOAPROD
ONEXEC 01.08 2012/12/10 2013/01/20 12:01 16 14 0 IOAPROD
SHUTSYS 01.11 2013/01/09 2013/02/17 22:04 37 12 0 IOAPROD
STARTSYS 01.20 2012/12/05 2013/02/13 23:54 66 11 0 IOAPROD
STATS 01.07 2012/12/10 2013/01/24 17:10 12 13 0 IOAPROD
OPTIONS S SELECT B BROWSE D DELETE 14.52.55
-
Type Y (Yes) in the window to delete the table.
-
Type N (No) in the window to cancel the deletion request.
If the PDSMAN product is operational at your site, $$$SPACE members cannot be deleted.
For each table deleted, a message is written to the IOA Log.
Rule List Screen
The Rule List screen displays the list of rules in a rule table. This screen can be entered directly from the entry panel or the Table List screen, or upon returning from the Rule Definition screen.
If the S (Select) option was specified in the Table List screen for a table which is currently in use ("selected") by another user, then depending on the User Profile definition, either the Rule List screen is not displayed (that is, the Table List screen remains displayed; this is the default), or the Rule List screen is displayed in Browse mode. In either case, an appropriate message is displayed.
Fig.JV.3.6 Rule Definition Rule List Screen
----------- CONTROL-M/JCL VERIFY RULES - RULES OF TABLE: NEWRULES --------(JR)
COMMAND ===> SCROLL===> CRSR
OPT NAME -------- TYP VV.MM CREATED CHANGED ID --------------
JCLLIB JCLLIB 01.00 2013/01/29 2013/01/29 13:51 IOATEST
JOB JOB 01.00 2013/01/29 2013/01/29 13:58 IOATEST
EXEC EXEC 01.00 2013/01/29 2013/01/29 13:59 IOATEST
PROC PROC 01.00 2013/01/29 2013/01/29 14:01 IOATEST
DD DD 01.00 2013/01/29 2013/01/29 14:05 IOATEST
====== >>>>>>>>>>>>>>>>>>> NO MORE JOBS IN TABLE <<<<<<<<<<<<<<<< ===
OPTIONS S SELECT D DELETE I INSERT C COPY 15.36.30
Format of the Rule List Screen
Next to each rule name in the Rule list, certain information can be displayed. The type and format of this information depends on whether the screen is displayed in DESC format or in STAT format:
-
In DESC format, the description of the rule, taken from the DESCRIPTION field of the rule definition, is displayed. This is the default.
-
In STAT format, the ISPF-like statistical information relating to the rule is displayed.
To change formats, use the DESC or STAT commands. To change the order in which the rules are displayed in the Rule List screen, use the SORT R command. For more information about these commands, see Format of the Rule List Screen.
Commands of the Rule List Screen
The following commands can be entered in the COMMAND field of the Rule List screen:
Tab.JV.3.10 Commands of the Rule List Screen
Command |
Description |
---|---|
DESC |
The DESC command displays the rule description next to the rule name. The description is taken from the DESC field in the rule. |
STAT |
The STAT command displays the following ISPF-like statistical information next to the rule names:
|
SORT R |
The SORT R command sorts the list of rules in the Rule List screen according to the RULE field. |
Options of the Rule List Screen
Use one of the rule options shown in the following table by specifying the option next to the rule name and pressing Enter.
Tab.JV.3.11 Options of the Rule List Screen
Option |
Description |
---|---|
S (SELECT) |
Display the Rule Definition screen which contains details of the specific rule. If the Rule Definition screen is displayed in Browse mode, the rule definition can only be browsed; it cannot be modified. If the Rule Definition screen is not displayed in Browse mode, the rule definition can be edited and updated. |
D (DELETE) |
Delete a rule from the Rule list. |
I (INSERT) |
Insert a new rule in the list. The Rule Definition screen appears, with the same parameter values as the rule marked I. |
C (COPY) |
Copy the rule to another table (described below). Multiple rules can be selected. |
If the Rule List screen is displayed in Browse mode, options D (Delete) and I (Insert) are not available.
Copying Rules to another Table
To copy one or more rules from the current table to another table, type C (Copy) next to the rules names in the Rule List screen and press Enter. The screen shown in the following figure is displayed.
Fig.JV.3.7 Rule List Screen Copy Window
----------- CONTROL-M/JCL VERIFY RULES - RULES OF TABLE: PROD --------(JR)
COMMAND ===> SCROLL===> CRSR
OPT NAME -------- TYP VV.MM CREATED CHANGED ID --------------
PAYROLL1 DD 01.01 2013/02/17 2013/02/19 19:03 IOAPROD
C PAYROLL2 DD 01.00 2013/02/19 2013/02/19 19:04 IOAPROD
====== >>>>>>>>>>>>>>>>>>> NO MORE JOBS IN TABLE <<<<<<<<<<<<<<<< ===
+-----------------------------------------------------------+
| |
| SPECIFY DESTINATION TABLE AND RULE NAME |
| |
| TABLE |
| RULE PAYROLL |
| |
| PRESS END/RESET TO CANCEL ENTER TO PERFORM THE COPY |
+-----------------------------------------------------------+
OPTIONS S SELECT D DELETE I INSERT C COPY 19.13.20
The window contains the following fields. Some fields contain default values which can be modified.
Tab.JV.3.12 Fields of the Rule List Screen Copy Window
Field |
Description |
---|---|
TABLE |
Name of the table into which the rule should be copied. A rule can only be copied to another table. It cannot be copied to its own table (even if the rule is renamed). If the specified table does not exist, the table is created when the request is performed. |
ULE |
Name of the rule to be copied. If multiple rules are selected, the window is first displayed with the first selected rule. As each request is preformed or canceled, the next requested rule name appears. |
-
To perform a request, press Enter.
-
To cancel a request, press PF03/PF15 (END) or PF04/PF16 (RESET).
Rule Definition Screen
This screen is used to define, display and modify various rule parameters (such as those for a message, string, command, or event). The rule parameters determine Control-M JCL Verify selection and action management. This screen can be entered directly from the entry panel or from the Rule List screen.
The following rule definition screens are available:
-
Site Standards Rule Definition Screen
-
Reformatting Rule Definition Screen
-
Enforcement Rule Definition Screen
Some parameters can be specified multiple times in a definiton screen. Whenever you fill in the last occurrence of the parameter on the screen, Control-M JCL Verify adds a new empty occurrence of the parameter that can be filled in. The only limit to the number of occurrences is the region size available for the application. The following parameters can be specified multiple times:
-
DESC
-
ON
-
DO
The rule parameters can take up more than one screen.
To delete a parameter on the screen, erase it (press the EOF key, or blank it out). If additional operations are required, Control-M JCL Verify issues appropriate instructions.
The rule parameters are divided into the following basic groups:
For a detailed explanation of each rule parameter, see Parameter Descriptions.
Fig.JV.3.8 Site Standards Rule Definition Screen
- CONTROL-M/JCLVERIFY RULE: TESTENV TABLE: TABLE1
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| RULE ENVIRONMENT PRIORITY CONTINUE SEARCH |
| DESC |
| DESC |
| =========================================================================== |
| JOBNAME |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB O/N |
| =========================================================================== |
| ON |
| =========================================================================== |
| O N T Y P E S: |
| |
| INIT END |
| JOB INCLUDE JCLLIB |
| EXEC PROC STEPEND |
| DD DDSYSIN DDSYSOUT |
| =========================================================================== |
| DO |
| =========================================================================== |
| D O T Y P E S: |
| |
| IF ELSE RETURN ENDIF SET MSG REXX |
| WHILE ENDWHILE ADJMSG |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: EDIT DOOPT ONOPT CANCEL 16.38.45
Fig.JV.3.9 Reformatting Rule Definition Screen
- CONTROL-M/JCL VERIFY REFORMATTING RULE: SAMPJOB TABLE: REFSAMP
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| RULE SAMPJOB ENVIRONMENT GENERAL PRIORITY 01 SHOW ORIGINAL N |
| DESC |
| DESC |
| =========================================================================== |
| JOBNAME |
| LIBRARY MEMBER O/N |
| =========================================================================== |
| ON JOB CLASS PRTY USER |
| ACCOUNT O/N |
| =========================================================================== |
| REFORMATTING O N T Y P E S: |
| |
| JOB INCLUDE JCLLIB |
| EXEC DD PROC |
| =========================================================================== |
| DO |
| =========================================================================== |
| REFORMATTING D O T Y P E S: |
| |
| COMMENT KEYWORDS POS ONTYPE CONT ARRANGE SET MSG |
| IF ELSE ENDIF WHILE ENDWHILE |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: EDIT DOOPT ONOPT CANCEL 16.38.45
Fig.JV.3.10 Enforcement Rule Definition Screen
- CONTROL-M/JCL VERIFY ENFORCEMENT RULE: ENFSAMP TABLE: ENFSAMP
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| RULE ENFSAMP ENVIRONMENT GENERAL PRIORITY 01 SHOW ORIGINAL Y |
| DESC |
| DESC |
| =========================================================================== |
| JOBNAME |
| LIBRARY MEMBER |
| =========================================================================== |
| ON |
| =========================================================================== |
| ENFORCEMENT O N T Y P E S : |
| |
| INIT END |
| JOB INCLUDE JCLLIB |
| EXEC PROC STEPEND |
| DD DDSYSIN DDSYSOUT |
| =========================================================================== |
| DO |
| =========================================================================== |
| ENFORCEMENT D O T Y P E S : |
| ENFORCE IAFTER IBEFORE |
| DELREC IF ELSE |
| RETURN ENDIF SET |
| MSG REXX ICMNTB |
| ICMNTA REPCMNT DELCMNT |
| WHILE ENDWHILE |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: EDIT DOOPT ONOPT CANCEL 16.38.45
General Parameters
The parameters shown in the following figures are used to provide general information about the rule and to determine rule searching processing. The General parameters are described in General Parameters - Summary.
Fig.JV.3.11 General Parameters for Site Standards
| RULE RULE1 ENVIRONMENT GENERAL PRIORITY 50 CONTINUE SEARCH Y |
| DESC TESTS |
| DESC |
| =========================================================================== |
Fig.JV.3.12 General Parameters for Reformatting and Enforcement
| RULE RULE1 ENVIRONMENT GENERAL PRIORITY 50 SHOW ORIGINAL Y |
| DESC TESTS |
| DESC |
| =========================================================================== |
Common Selection Parameters
Common Selection parameters, shown in the following figures, which are common to all the various ON parameters types, specify which JCL statements will trigger the validation processes to be performed by Control-M JCL Verify. Several selection blocks can be specified with Or/Not relationships. The Common Selection parameters are described in Common Selection Parameters - Summary.
Fig.JV.3.13 Common Selection Parameters for Site Standards
| =========================================================================== |
| JOBNAME |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB O/N |
| =========================================================================== |
Fig.JV.3.14 Common Selection Parameters for Reformatting and Enforcement
| =========================================================================== |
| JOBNAME |
| LIBRARY MEMBER O/N |
| =========================================================================== |
Event Selection Parameters
Event Selection parameters specify selection conditions that must be fulfilled before Control-M JCL Verify will perform designated actions.
The following figures show typical screens with Event Selection parameters.
Fig.JV.3.15 Event Selection Parameters for Site Standards
| =========================================================================== |
| ON DD SYSUT1 DSN M66.* |
| DISP SHR UNIT VOL |
| SMS CLASS DATA STORAGE MANAGEMENT O/N |
| =========================================================================== |
| O N T Y P E S: |
| |
| INIT END |
| JOB INCLUDE JCLLIB |
| EXEC PROC |
| DD DDSYSIN DDSYSOUT |
| =========================================================================== |
Fig.JV.3.16 Event Selection Parameters for Reformatting
| =========================================================================== |
| ON JOB CLASS PRTY USER |
| ACCOUNT O/N |
| =========================================================================== |
| REFORMATTING O N T Y P E S: |
| |
| JOB INCLUDE JCLLIB |
| EXEC DD PROC |
| =========================================================================== |
Fig.JV.3.17 Event Selection Parameters for Enforcement
| =========================================================================== |
| ON |
| =========================================================================== |
| ENFORCEMENT O N T Y P E S : |
| |
| INIT END |
| JOB INCLUDE JCLLIB |
| EXEC PROC STEPEND |
| DD DDSYSIN DDSYSOUT |
| =========================================================================== |
An ON statement is comprised of the ON field and the optional parameters listed in Event Selection Parameters - Summary At least one ON statement is required. Additional ON statements with the same type of subparameter can be specified using the Or/Not option described below. Type one of the following options in the ON field and press Enter. Specify a value for the selected option, and specify values as indicated for any additional subparameters.
Mask characters (* and ?) can be used when specifying values for all ON selection.
The following table shows the O/N subparameter that is displayed for all types of ON statements.
Tab.JV.3.13 ON Statement Or/Not Subparameter
Subparameter |
Description |
STDR |
ENF |
REF |
---|---|---|---|---|
O/N |
Conjunctional parameter for linking ON statements. Specifying O (Or), or N (Not) opens a new ON statement and links the new statement to the line containing the O/N specification. |
Y |
Y |
Y |
Action Parameters: DO Statement
Action parameters (DO statements) specify actions to be performed by Control-M JCL Verify. These actions are performed only after conditions specified in the Event Selection parameters have been fulfilled.
The following figures show typical screens with Action parameters.
Fig.JV.3.18 Action Parameters for Site Standards
| =========================================================================== |
| DO MSG TYPE I RULE RULE1 TABLE:ILYA |
| DO SET %%A = LINE2 |
| DO MSG TYPE I RULE RULE1 LINE2 |
| DO |
| =========================================================================== |
| D O T Y P E S: |
| |
| IF ELSE RETURN ENDIF SET MSG REXX |
| WHILE ENDWHILE ADJMSG |
Fig.JV.3.19 Action Parameters for Reformatting
| DO |
| =========================================================================== |
| REFORMATTING D O T Y P E S: |
| |
| COMMENT KEYWORDS POS ONTYPE CONT ARRANGE SET MSG |
| IF ELSE ENDIF WHILE ENDWHILE |
Fig.JV.3.20 Action Parameters for Enforcement
| DO |
| =========================================================================== |
| ENFORCEMENT D O T Y P E S : |
| ENFORCE IAFTER IBEFORE |
| DELREC IF ELSE |
| RETURN ENDIF SET |
| MSG REXX ICMNTB |
| ICMNTA REPCMNT DELCMNT |
| WHILE ENDWHILE |
At least one DO statement must be specified in a rule.
Tthe DO IF, DO ELSE and DO ENDIF statements provide Boolean "IF" logic capability, allowing for alternative actions to be performed. In addition, the DO WHILE and DO ENDWHILE statements enable use of repetition (loop) logic, allowing for repeated DO actions for as long as a specified condition is met.
A list of allowable DO options is displayed in the DO TYPES section under the Action parameters section of the Rule Definition screen. The DOOPT command can be used to alternately hide or display this list.
To delete a DO statement, place the cursor on the first letter in the DO field and press the EOF key on your keyboard or blank the field.
Commands of the Rule Definition Screen
The following commands can be specified in the COMMAND field of the Rule Definition screen.
Tab.JV.3.14 Commands of the Rule Definition Screen
Command |
Description |
---|---|
DOOPT |
The DOOPT command alternately displays or hides the list of allowable Automated Console Action parameters (DO OPTIONS). |
ONOPT |
The ONOPT command alternately displays or hides the list of allowable Event Selection parameters (ON OPTIONS). |
Editing Rule Definitions in the Edit Environment
Rule Definition parameters can be edited, that is, moved, copied, deleted, or repeated, by performing IOA Line Editing commands, similar to standard ISPF line commands, from within the Control-M JCL Verify Edit environment.
The Edit Environment in a Rule Definition screen is accessed by typing EDIT in the COMMAND field and pressing Enter.
A 2-character Line Editing command field, marked by underscores, is displayed for each line in the Rule Definition screen.
Editing commands are typed directly onto these underscores.
Fig.JV.3.21 Entering Editing Commands
- CONTROL-M/JCLVERIFY RULE: DOTYP05 TABLE: DOTYPES0
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
__ RULE DOTYP05 ENVIRONMENT GENERAL PRIORITY 50 CONTINUE SEARCH Y
C_ DESC DOTYP05 RETURN
A_ DESC
__ ===========================================================================
__ JOBNAME *
__ ===========================================================================
__ LIBRARY * MEMBER DOTYPE01
__ SCHDLIB SCHDTAB O/N
__ ===========================================================================
__ ON JOB CLASS PRTY USER
__ ACCOUNT O/N
__ ===========================================================================
__ DO SET %%Q = %%$BLANK
__ DO
__ IF %%Q EQ %%$BLANK
__ DO MSG TYPE E RETURN ACTIVATED RC 0010 RS 2222
__ DO
__ RETURN RC 0010 RS X' 2222 '
__ ENDIF
__ DO
FILL IN RULE DEFINITION. CMDS: EDIT DOOPT ONOPT CANCEL 18.52.23
The line editing commands that you have typed are processed when Enter is pressed.
For more information and examples of editing rule definitions in the Edit environment, see Editing Rule Definitions in the IOA Edit Environment.
Exiting the Rule List Screen
Press END (PF03/PF15) to exit the Rule List screen. If changes have been made, the Exit Option window, shown in the following figure, is opened.
Fig.JV.3.22 Rule List Screen Exit Option Window
----------- CONTROL-M/JCL VERIFY RULES - RULES OF TABLE: BAS --------(JR)
COMMAN +-----------------------------------------------------------+ ===> CRSR
OPT N | PLEASE SELECT EXIT OPTION | ---------
E | |
P | SAVE CREATE |
D | |
D | TABLE BAS |
===== | | <<<< ====
+-----------------------------------------------------------+
OPTIONS S SELECT D DELETE I INSERT C COPY 15.10.05
You must type Y (Yes) or N (No) in one of the two exit options, SAVE or CREATE. It is possible to change the name of the table or the name of the rule in the window. You will return either to the Table list or to the entry panel, depending on how you entered the Rule List screen.
Changes made to rules in the table can be saved only by saving an entire table using the Exit Option window.
If you have entered an Exit Option window, but do not want to exit the Rule List screen, press PF04/PF16 (RESET). The Rule List screen is then displayed, and the table is not saved.
Parameter Descriptions
Rule definition parameters fall into the following basic categories:
-
General Parameters - general information. Optional.
-
Common Selection Parameters - common selection conditions. Optional.
-
Event Selection Parameters - event selection conditions. Mandatory.
-
Action Parameters - actions to be performed. Mandatory.
This section contains detailed descriptions of all parameters available in the Rule Definition screen. Parameters are arranged in alphabetical order. Within each parameter, subparameters are arranged according to the order of the fields on the screen.
Each parameter includes
-
a brief explanation of the purpose of the parameter
-
the format required for defining the parameter within an extract of the Control-O screen
-
general information explaining the parameter and its usage
-
where applicable, some practical examples illustrating implementation of the parameter
For more information on the Rule Definition facility, see Rule Definition Facility.
CONTINUE SEARCH: General Parameter
Determines whether to continue to search for additional rules that meet the selection criteria. For site standards only.
Mandatory. Valid values are shown below.
Tab.JV.3.16 CONTINUE SEARCH Values
Value |
Description |
---|---|
Y (Yes) |
After the DO actions in this rule are performed, Control-M JCL Verify continues to search for additional rules with matching selection criteria. The search continues until a matching rule is found in which a value of N (No) is specified for CONTINUE SEARCH, or until all possible DO actions have been performed. Default. |
N (No) |
After the DO actions in this rule are performed, Control-M JCL Verify stops searching for additional rules with matching selection criteria. |
DESC: General Parameter
Description of the rule definition (in free text).
Optional. This parameter may consist of one or more lines of free text. After you have filled in one line, a new blank line is automatically displayed.
General Information
The DESC parameter does not operate as a selection parameter. It serves as internal documentation to aid in the identification and description of individual rules.
The first line of the rule description appears as the description of the rule in the Rule List screen, and the first 20 characters of the description are displayed in the Rule Status screen. It is therefore advisable to place the most important information at the beginning of the rule description.
Text for the DESC parameter can be specified in any language.
DO statement: Action Parameter
Actions taken when ON message or event criteria are satisfied.
Optional. Specify DO statements as follows:
-
Type the action keyword (for example, MSG) in the DO field and press Enter.
-
In many cases, subparameter fields are displayed. Fill in the subparameters and press Enter again.
After entering a DO statement, another DO line is automatically displayed. Multiple DO statements can be specified.
To prevent infinite loops and performance degradation, Control-M JCL Verify performs no more than 10000 actions in a rule before terminating the rule.
The following table shows valid DO actions. Each is discussed individually later in this chapter.
Tab.JV.3.17 DO Actions
Action |
Description |
STDR |
ENF |
REF |
---|---|---|---|---|
DO ADJMSG |
Suppresses Control-M JCL Verify messages or changes their severity in a dynamic manner. |
Y |
N |
N |
DO ARRANGE |
Specifies the order of the keywords in a JCL statement, according to a JCL statement type (JOB, EXEC, DD). |
N |
N |
Y |
DO COMMENT |
Specifies the starting position of a comment within a JCL statement. |
N |
N |
Y |
DO CONT |
Specifies the starting position of the continuation of a JCL statement. |
N |
N |
Y |
DO DELCMNT |
Deletes a specified comment number. Available only for ON INIT. |
N |
Y |
N |
DO DELREC |
Deletes the current JCL statement. |
N |
Y |
N |
DO ENDSTMT |
Exits from the rule and continues with the next JCL statement. |
Y |
Y |
N |
DO ENFORCE |
Assigns a value to a variable to enforce in a JCL statement. |
N |
Y |
N |
DO IAFTER |
Inserts a new record after the current JCL statement. |
N |
Y |
N |
DO IBEFORE |
Inserts a new record before the current JCL statement. |
N |
Y |
N |
DO ICMNTA |
Inserts a new comment after a specified comment number. Available only for ON INIT. |
N |
Y |
N |
DO ICMNTB |
Inserts a new comment before a specified comment number. Available only for ON INIT. |
N |
Y |
N |
DO IF / DO ELSE / DO ENDIF |
Provide Boolean "IF" logic capability allowing for alternative actions to be performed. |
Y |
Y |
Y |
DO KEYWORDS |
Specifies the number and positions of keywords in a JCL statement. |
N |
N |
Y |
DO MSG |
Defines a message to be displayed in the output. |
Y |
Y |
Y |
DO ONTYPE |
Specifies the starting position of a JCL statement type (JOB, EXEC, DD) in the JCL statement. |
N |
N |
Y |
DO POS |
Specifies the maximum number and column range of positionals in a JCL statement. |
N |
N |
Y |
DO QUITMEM |
Exits from the rule and continues with the next job or procedure. |
Y |
Y |
N |
DO REPCMNT |
Replaces a specified comment number with a new comment. Available only for ON INIT. |
N |
Y |
N |
DO RETURN |
Exits from a rule and returns to Control-M JCL Verify to continue with the next rule. |
Y |
Y |
N |
DO REXX |
Calls user exit written in REXX. |
Y |
Y |
N |
DO SET |
Assigns a value to a user-defined or AutoEdit variable. |
Y |
Y |
Y |
DO WHILE / DO ENDWHILE |
Enable use of repetition (loop) logic allowing for repeated DO actions for as long as a specified condition is met. |
Y |
Y |
Y |
General Information
DO statements specify actions to be performed when the rule is triggered.
DO statements can be performed repetitively, or conditionally, or both repetitively and conditionally, for example, by using DO IF statements, as described in DO IF / DO ELSE / DO ENDIF: Action Parameter, or by using DO WHILE statements, as described in DDO WHILE / DO ENDWHILE: Action Parameter.
Whenever a DO statement is specified, an empty DO statement is added after it. This allows specification of an unlimited number of DO statements.
To add an empty DO statement between two existing DO statements, specify the appropriate Line Editing command in the Edit environment. For more information on the Edit environment, see Editing Rule Definitions in the IOA Edit Environment.
To delete unwanted DO statements, either delete the DO action keyword and press Enter or specify the appropriate Line Editing commands in the Edit environment. For more information on the Edit environment, see Editing Rule Definitions in the IOA Edit Environment.
Various built-in functions are available for any of the DO statements that require textual input. For more information, see Built-in functions for DO statements.
Built-in functions for DO statements
The following built-in functions are available for any of the DO statements that require textual input.
Tab.JV.3.17a Built-in functions
Function |
Description |
---|---|
CALCDATE |
Performs date calculations based on a given date. Valid format: Copy
where date - must be in the format yymmdd quantity - is a number, or numeric AutoEdit expression, of days to add to or subtract |
GETWORD |
Gets the value of a JCL parameter from a predefined variable. Valid format: Copy
where
|
LENGTH |
Returns the length of string. Valid format: Copy
where argument - a variable name or a built-in function |
LOWER |
Convert a string into lowercase characters. Valid format: Copy
|
NUM |
Return the numeric value of a variable. Used for converting values that appear in such variables as: REGION, MEMLIMIT, BLKSIZE. (For example, 10M can be converted to 10000000). Valid format: Copy
|
ORIGIN |
Verifies if JCL parameters were added by the user or they were added as JCL or CTM default parameters. Valid format: Copy
where var_operand - a variable name For the following "ON" statements: JOB, INCLUDE, EXEC, DD, END, PROC, DDSYSIN, JCLLIB, DDSYSOUT the input can be:
|
ORIGIN (continued) |
For the following "ON" statements: EXEC, DD, END, DDSYSIN, DDSYSOUT the input can be:
For the following "ON" statements: DD, DDSYSIN, DDSYSOUT, END the input can be:
If the input value is invalid (not from the above list for each "ON" statement) an error is displayed in the Control-M JCL Verify Rule Definition Facility (JR screen). The ORIGIN function can return the following values:
ORIGIN can only accept one Control-M JCL Verify built-in variable as an input. An error message is displayed, if the user types an invalid value. For example, for the following ON JOB statement: Copy
An error message is displayed since the %%$EXECTIME variable is not a valid input for an ON JOB statement (as indicated in the above list). |
POS |
Locates a substring in a specified string, and returns the position of the first occurrence of the located substring. Valid format:
If the substring is not found in the specified string, function %%$POS returns a value of 0. |
SUBSTR |
Returns the substring of string that begins at the nth character and is of defined length, padded with pads if necessary. Valid format: Copy
where
|
TIME |
Returns the current time in HHMMSS format. Valid format: Copy
|
UPPER |
Convert a string into uppercase characters. Valid format: Copy
|
ISNUM |
Indicates whether a specified string is numeric. In order to be considered numeric, the specified string must contain only numeric characters from 0 through 9, because a numeric string cannot contain letters, blanks, or special characters. Possible values returned by this function are
Valid format: Copy
|
PARSE |
The %%$PARSE function is a powerful tool that offers extensive string manipulation capabilities. This function, which is similar to the REXX PARSE command in the TSO/E environment, can be used to analyze and extract information from various variables strings. The %%$PARSE function parses a specified string (that is, it splits the specified string into substrings) according to a specified template. A template consists of variables and "patterns" that determine the parsing process. Variable %%$PARSRC contains how the function ended. It is recommended that whenever using %%$PARSE to always check the variable %%$PARSRC. Valid format: Copy
where
Copy
The %%$PARSE function assigns substrings of the specified string to the specified variables according to the specified template. The DO SET statements in the above example provide the same result as the following DO SET statements: Copy
|
PARSE (continued) |
This example is similar to Example 1, except that a comma is used as the delimiter between words. If the string includes commas, instead of blanks, as in the following: Copy
use the following pattern to achieve the same results as in Example 1 above: Copy
For more details about the %%$PARSE function, see The %%$PARSE Function. |
PARSRC |
The return code resulting from a %%$PARSE function that indicates whether the parsed string matched all string patterns in the template. Valid values returned by this function are
|
NULL |
A null variable. Valid format: Copy
|
BLANK |
Resolves to one blank. Valid format: Copy
|
BLANKn |
Resolves to n blanks, where n is a number from 1 through 99. Valid format: Copy
|
WORDS |
The number of words in the varname variable. A comma or a blank can serve as a delimiter within the variable. Valid format: Copy
|
PLUS |
Arithmetic operator that adds two operands. Valid format: Copy
Copy
|
MINUS |
Arithmetic operator that subtracts one operand from another operand. Valid format: Copy
Copy
Negative values are not supported, therefore the results are always absolute. For example: Copy
|
TIMES |
Arithmetic operator that multiplies one operand by another operand. Valid format: Copy
Copy
|
DIV |
Arithmetic operator that divides one operand by another operand. Valid format: Copy
DO SET %%I = %%I %%$DIV 1 |
D2X |
Decimal value-to-hexadecimal string converter. The maximum number that can be converted with this variable is 2147483647, or 231-1. Valid format: Copy
To convert decimal 4095 to the equivalent hexadecimal string (FFF), specify %%$D2X 4095. |
X2D |
Hexadecimal string-to-decimal value converter. The result of the conversion is always positive. The highest number that can be converted using this variable is 7FFFFFFF. Valid format: Copy
To convert the hexadecimal string "FFF" to the equivalent decimal value (4095), specify %%$X2D FFF. |
X2C |
Hexadecimal string-to-character converter. Valid format: Copy
To convert the hexadecimal string "2A4F" to text format, specify %%$X2C 2A4F. |
SYSINREAD |
The %%$SYSINREAD function reads data from SYSIN statements (in-stream, PDS members, and sequential files). Valid format: Copy
where varname - is the name of the stem variable After the execution: %%varname0 - holds the number of records read %%varname1 - holds the first data record (80 chars) lines - maximum number of lines to read start - number indicating the first line to read To read the entire SYSIN, “lines start” can be omitted and the following call can be used: Copy
The function returns the following return codes:
Copy
|
CURSTMTTYP |
Returns the current statement type where the specified comment card appears. Available only for ON INIT rules. Valid format: Copy
where n is the comment card number/index (or a variable). |
CURSTMTLBL |
Returns the current statement label where the specified comment card appears. Available only for ON INIT rules. Valid format: Copy
where n is the comment card number/index (or a variable). |
NXTSTMTTYP |
Returns the next statement type relative to where the specified comment card appears. Available only for ON INIT rules. Valid format: Copy
where n is the comment card number/index (or a variable). |
NXTSTMTLBL |
Returns the next statement label relative to where the specified comment card appears. Available only for ON INIT rules. Valid format: Copy
where n is the comment card number/index (or a variable). |
UNDERSTEP |
Returns the step name under which the specified comment card appears. Available only for ON INIT rules. Valid format: Copy
where n is the comment card number/index (or a variable). |
CMNT2JCL |
Returns the JCL card number (as in %%$JCLx) that corresponds to the specified comment card. Available only for ON INIT rules. Valid format: Copy
where n is the comment card number/index (or a variable). |
CURSTMTFJ |
Returns the JCL card number (as in %%$JCLx) that corresponds to the first JCL card in the statement where the specified comment card appears. Available only for ON INIT rules. Valid format: Copy
where n is the comment card number/index (or a variable). |
CURSTMTLJ |
Returns the JCL card number (as in %%$JCLx) that corresponds to the last JCL card in the statement where the specified comment card appears. Available only for ON INIT rules. Valid format: Copy
where n is the comment card number/index (or a variable). |
CMNTLOC |
Returns one of the following values:
Available only for ON INIT rules. Valid format: Copy
where n is the comment card number/index (or a variable). |
DO ARRANGE: Action Parameter
Specifies the order of the keywords in JCL statements. For the DO ARRANGE parameter, the keywords are listed, first the keywords with values and then the remaining keywords, in alphabetical order, from left to right, in a maximum of 5 columns. A different list of keywords is provided for different JCL statement types. For reformatting only.
The valid format is
ARRANGE TYPE keyword_n1 value_n1 keyword_n2 value_n2
keyword_n3 value_n3 keyword_n4 value_n4 keyword_n5 value_n5 ...
where
-
TYPE is the JCL statement type specified for the ON field, such as JOB, EXEC, DD, and DCB (as part of a ON DD statement).
-
keyword_nx is a keyword
-
value_nx is a number, which the user enters to specify the order of the keywords. The valid values are in the range from 01 to 99, where 01 specifies that the keyword is the first and 99 specifies that the keyword is the last.
The values are used to specify a relative order, not an absolute order. For example, if the value 10 is assigned to a keyword, that keyword will be first, if there are no other keywords assigned with numbers lower than 10. The keyword will be last, if there are other keywords assigned with numbers lower than 10, but none with numbers higher than 10.
Optional. Type ARRANGE in the DO field, and press Enter. The list of keywords is displayed for the ON type. Enter a valid value in the fields following the keywords to specify their order.
DO COMMENT: Action Parameter
Specifies the starting position for comments in the JCL statements. For reformatting only.
The valid format is
COMMENT FROM value
where
-
value can be a number from 40 up to and including 71. Default is 50.
Optional. Type COMMENT in the DO field, and press Enter. The FROM field is displayed. Enter a value within the valid range. If the comment continues beyond the 71st position in the record, the text continues on the next line of the JCL statement, starting from the position specified by the FROM value. When the last line of the JCL statement is reached, one or more comment records are added to the JCL statement, and the text continues in these records, from the same position specified by the FROM value, until all the comment text is displayed.
When DO COMMENT is not specified in the rule, the default is as follows:
-
When only DO MSG and/or DO SET are specified in the rule, the JCL statement will not be changed after reformatting.
-
When one or more of the other reformatting DO actions are specified, for example DO ARRANGE, all comments will start in the same position where the first comment in the JCL statement starts.
DO CONT: Action Parameter
Specifies the starting position of the continuation of a JCL statement. For reformatting only.
The valid format is
CONT FROM value
where
-
value can be a number from 4 up to and including 16. Default is 16.
Optional. Type CONT in the DO field, and press Enter. The FROM field is displayed. Enter a value within the valid range.
When DO CONT is not specified in the rule, the default is as follows:
-
When only DO MSG and/or DO SET are specified in the rule, the JCL statement will not be changed after reformatting.
-
When one or more of the other reformatting DO actions are specified, for example DO ARRANGE, the default is FROM 16.
DO DELREC: Action Parameter
Deletes the current JCL statement. For enforcement only.
The valid format is
DELREC
Optional. Type DELREC in the DO field, and press Enter.
DO ICMNTA: Action Parameter
Adds a new comment after the specified comment number. For enforcement only. Available only for ON INIT rules.
The valid format is
DO ICMNTA COMMENT# num
new_comment
Where:
-
num -the comment number after which to add the new comment (16 chars)
-
new_comment - the new comment to add (72 chars)
DO ICMNTB: Action Parameter
Adds a new comment before the specified comment number. For enforcement only. Available only for ON INIT rules.
The valid format is
DO ICMNTB COMMENT#
numnew_comment
Where:
-
num -the comment number before which to add the new comment (16 chars)
-
new_comment - the new comment to add (72 chars)
DO REPCMNT: Action Parameter
Replaces a comment number with a new comment. For enforcement only. Available only for ON INIT rules.
The valid format is
DO REPCMNT COMMENT#
numnew_comment
Where:
-
num -the comment number to replace (16 chars)
-
new_comment - the new comment to add (72 chars)
For an example of how to use the DO REPCMNT action parameter, see the DO WHILE In this example, an AUDIT comment in the JCL reflects the last time that an enforcement for the JCL took place and who made the change:.
DO DELCMNT: Action Parameter
Deletes a comment number. For enforcement only. Available only for ON INIT rules.
The valid format is
DO DELCMNT COMMENT# num
Where:
num -the comment number to delete (16 chars)
DO ENFORCE: Action Parameter
Assigns a value to a variable in a JCL statement. For enforcement only.
The valid format is
ENFORCE variable = value
where
-
variable can be a user defined or global variable.
-
value can be a number, text, or variable.
Optional. Type ENFORCE in the DO field, and press Enter. An empty field is displayed. Enter the variable and the value that is being assigned to it.
Tab.JV.3.18 Built-in ENFORCEMENT functions
Function |
Description |
---|---|
REMOVE |
Performs removal of a parameter from the JCL. Valid format: Copy
where %%$var is any system variable representing a JCL parameter which is supported under the specific ON event context. Given Copy
The command: Copy
Will result in: Copy
Given the above DISP, the following commands: Copy
Will result in: Copy
Removing all sub parameters of a parameter such as DISP above, does not automatically remove the DISP=(,,) itself. The following special system variables are supported only when they appear on the left side of %%$var = %%$REMOVE for removing the entire parameter:
So given: Copy
will remove the whole DISP parameter and will result in: Copy
The removal is performed without checking that the resultant statement is valid. |
GROUP |
Performs grouping of all DCB-type parameters that appear outside of the DCB=(…) parameter, so that they will appear as sub-parameters under the DCB=(…) parameter. Valid format: Copy
|
UNGROUP |
Performs ungrouping of all DCB sub-parameters that appear in the DCB=(…) parameter, so that they will appear as standalone DD parameters without the DCB=(…) parameter. Valid format: Copy
For example: |
DO IAFTER: Action Parameter
Inserts a new record after the current JCL statement. For enforcement only.
The valid format is
IAFTER rec
where
-
rec is the record to be inserted. It can be up to 72 characters.
Optional. Type IAFTER in the DO field, and press Enter. An empty field is displayed. Enter the record to be inserted.
DO IBEFORE: Action Parameter
Inserts a new record before the current JCL statement. For enforcement only.
The valid format is
IBEFORE rec
where
-
rec is the record to be inserted. It can be up to 72 characters.
Optional. Type IBEFORE in the DO field, and press Enter. An empty field is displayed. Enter the record to be inserted.
DO IF / DO ELSE / DO ENDIF: Action Parameter
The DO block can optionally include IF/ELSE/ENDIF blocks. The block permits conditionally performing DO commands. DO IF, DO ELSE, and DO ENDIF statements provide Control-M JCL Verify with Boolean "IF" logic capability. These statements permit branching based on different criteria. The examples at the end of this section demonstrate combination of these statements.
Type IF in the DO field and press Enter. The word DO is replaced by the word IF on the screen. The same will occur when specifying ELSE and ENDIF in the DO fields.
The following figure shows the basic format of the IF/ ELSE/ ENDIF control statements.
Fig.JV.3.23 IF/ ELSE/ ENDIF Statements Format
IF conditional-expresssion1 [{AND|OR} conditional-expression2]
DO action
DO action
.
.
.
.
DO action
ELSE
DO action
DO action
.
.
.
.
ENDIF
The IF conditional expression has the following format:
IF operand operator operand
Valid logical operators are shown in the following table. For numeric comparisons, use the logical operators with the "#" symbol.
Tab.JV.3.19 Logical Operators for IF Statement
Operator |
Definition |
---|---|
EQ |
is equal to |
NE |
is not equal to |
GT |
is greater than |
GE |
is greater than or equal to |
LT |
is less than |
LE |
is less than or equal to |
Valid Boolean operators are shown in the following table.
Tab.JV.3.19a Boolean Operators for IF Statement
Operator |
Definition |
---|---|
AND |
both expressions must be true |
OR |
either expression must be true |
Operators that end with the pound sign (#) are used for numerical comparisons, as opposed to string comparisons.
An operand can be any character string. It can also be composed of AutoEdit symbols. In such cases, it is resolved into a character string before the conditional expression is analyzed at execution time.
Whenever non-numeric comparison operators are specified, operands are compared as character strings from left to right. For example, in the expression
IF 91 GT 1000
91 is greater than 1000 (because 9 is greater than 1).
An operand cannot be resolved into nulls (as in CLISTs). If it is possible that an operand will resolve into nulls, place a character before the first and second operands.
In the following example, the character B is placed before the two operands:
IF B%%A GT B%%C
An IF expression must be terminated with an ENDIF statement. The ELSE statement is optional.
General Information
When the IF expression is true, commands between the IF expression and its ELSE statement, or its matching ENDIF statement when no ELSE statement is present, are resolved by Control-M JCL Verify.
When the IF expression is not true, and an ELSE statement exists, only the statements after the ELSE statement are executed. If the ELSE clause does not exist, Control-M JCL Verify stops processing the IF expression and continues executing the rule.
IF expressions can be nested, providing that the above rules are observed. Up to 100 nested IF statements are permitted.
When the rule is saved, logical checks are performed to verify the validity of the rule statements. If an error is detected, an error message is issued upon exiting the rule, and the rule cannot be saved until the syntax is corrected.
To enable the display of IF/ELSE/ENDIF leveling numbering in the Control-M JCL Verify Rule Definition Facility (JR screen), use the JVNIFLVL profile variable. For more information, see Miscellaneous Variables in the INCONTROL for z/OS Administrator Guide.
In this example, if the account field in the job card is empty, we update it to "0000". If the class is not U or D, we issue an error message. The jobs that are tested are jobs that begin with PAY* and are submitted from the PRD.PAY.ACCOUNT.DAILY.JOBS library from members that begin with DPAY*.
Fig.JV.3.24 DO IF example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC For accounting jobs, enforce account information and |
| DESC class D and U |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON JOB CLASS PRTY USER |
| ACCOUNT O/N |
|=============================================================================|
| IF %%JOB_ACT EQ '' |
| DO MSG TYPE E Account field is empty.Automatically filled with "0000". |
| DO SET %%JOB_ACT = '0000' |
| ENDIF |
| IF %%$JOBCLS NE 'D' |
| IF %%$JOBCLS NE 'U' |
| DO MSG TYPE E JOBS of PAYABLE must run with class D or U. |
| ENDIF |
| ENDIF |
|=============================================================================|
DO WHILE / DO ENDWHILE: Action Parameter
The DO block can optionally include WHILE/ENDWHILE blocks. DO WHILE and DO ENDWHILE statements enable use of repetition (loop) logic in a rule. These statements can be used to repeatedly perform other DO actions for as long as a specified condition is met.
Type WHILE in the DO field and press Enter. The word DO is replaced by the word WHILE on the screen. The same will occur when you type ENDWHILE in a DO field.
The following figure shows the basic format of the WHILE and ENDWHILE statements.
Fig.JV.3.24a WHILE/ ENDWHILE Statements Format
WHILE conditional-expresssion1 [{AND|OR} conditional-expression2]
DO action
.
.
.
DO action
ENDWHILE
The WHILE conditional expression has the following format:
WHILE operand operator operand
Valid logical operators are shown in the following table. For numeric comparisons, use the logical operators with the "#" symbol.
Tab.JV.3.20 Logical Operators for WHILE Statement
Operator |
Definition |
---|---|
EQ |
is equal to |
NE |
is not equal to |
GT |
is greater than |
GE |
is greater than or equal to |
LT |
is less than |
LE |
is less than or equal to |
Valid Boolean operators are shown in the following table.
Tab.JV.3.20a Boolean Operators for WHILE Statement
Operator |
Definition |
---|---|
AND |
both expressions must be true |
OR |
either expression must be true |
Operators that end with the pound sign (#) are used for numerical comparisons, as opposed to string comparisons.
An operand can be any character string. It can also be composed of AutoEdit symbols. In such cases, it is resolved into a character string before the conditional expression is analyzed at execution time.
Whenever non-numeric comparison operators are specified, operands are compared as character strings from left to right. For example, in the expression
WHILE 91 GT 1000
91 is greater than 1000 (because 9 is greater than 1).
An operand cannot be resolved into nulls (as in CLISTs). If it is possible that an operand will resolve into nulls, place a character before the first and second operands.
In the following example, the character B is placed before the two operands:
WHILE B%%A GT B%%C
Each WHILE expression must be terminated with an ENDWHILE statement.
General Information
As long as the WHILE expression is true, commands between the WHILE expression and its matching ENDWHILE statement are repeatedly processed by Control-M JCL Verify.
IF statements can be nested within a WHILE statement, provided that each IF statement has a corresponding ENDIF statement. Up to 100 nested IF statements are permitted in one WHILE statement.
Only one WHILE statement can be nested in an IF statement. A WHILE statement cannot be nested in another WHILE statement.
When the rule is saved, logical checks are performed to verify the validity of the rule statements. If an error is detected, an error message is issued upon exiting the rule, and the rule cannot be saved until the syntax is corrected.
In this example, an AUDIT comment in the JCL reflects the last time that an enforcement for the JCL took place and who made the change:
//********************************************************************
//** JCLVERY 180503 162449 K68
//********************************************************************
The following rule looks for a JCLVERY eye-catcher and replaces the AUDIT comment with a new DATE and TIME and userID.
Fig.JV.3.24b DO WHILE example
| =========================================================================== |
| ON INIT |
| =========================================================================== |
| ENFORCEMENT O N T Y P E S : |
| |
| INIT END |
| JOB INCLUDE JCLLIB |
| EXEC PROC STEPEND |
| DD DDSYSIN DDSYSOUT |
| =========================================================================== |
| DO SET %%CONSTCMNT = JCLVERY |
| DO SET %%CMNTNUM = %%$CMNT0 |
| IF %%CMNTNUM NE# 0 |
| DO SET %%INDEX = 1 |
| WHILE %%INDEX LT# %%CMNTNUM |
| DO SET %%COMTEMP = %%$CMNT%%INDEX |
| DO SET %%FNDCOMNT = %%$POS %%CONSTCMNT %%COMTEMP 1 |
| IF %%FNDCOMNT NE# 0 |
| DO REPCMNT COMMENT# %%INDEX |
| * JCLVERY %%$DATE %%$TIME %%#REQUSER |
| ENDIF |
| DO SET %%INDEX = %%INDEX %%$PLUS 1 |
| DO |
| ENDWHILE |
| ENDIF |
| DO |
| =========================================================================== |
DO KEYWORDS: Action Parameter
Specifies the start of the first keyword and the end of the last keyword and maximum number of keywords in a JCL statement. For reformatting only. The valid format is
KEYWORDS FROM start_value TO end_value # OF KEYWORDSmax
where
-
start_value specifies the start of the first keyword and can be a number from 15 up to and including 68. Default is 16.
-
end_value specifies the end of the last keyword can be a number from 18 up to and including 71. Default is 71.
-
max specifies the maximum number of keywords in a JCL statement and can be a number from 1 up to and including 9. Default is a blank.
Optional. Type KEYWORDS in the DO field, and press Enter. The FROM, TO, and # OF KEYWORDS fields are displayed. Enter valid values.
If the keyword extends beyond the end_value, but this keyword is the only one in this JCL record the end_value is ignored.
If there is only one long keyword in the JCL record, the end_value is ignored, if necessary.
If there is only one long keyword in the JCL record, which would extend beyond the 71st position, the starting position of the keyword is shifted to the right so that the keyword does not extend beyond the 71st position. If there is a comment, it is inserted after the keyword.
When DO KEYWORDS is not specified in the rule, the default is as follows:
-
When only DO MSG and/or DO SET are specified in the rule, the JCL statement will not be changed after reformatting.
-
When one or more of the other reformatting DO actions are specified, for example DO ARRANGE, the default is FROM 16 TO 71.
DO MSG: Action Parameter
Adds messages to the verifier output.
The valid format is
MSG TYPE type text
where
-
type can be one of the following: I (Information), W (warning), or E (Error)
-
text is the message that is added to the output using a JCL Verify message ID that ends with I/W/E based on the type above.
Optional. Type MSG in the DO field, and press Enter. The TYPE field is displayed. Enter one of the valid values: I, W, or E. The maximum length of MSG is
-
107 characters (when MSG type is ERROR)
-
105 characters (when MSG type is WARNING)
-
101 characters (when MSG type is INFORMATION)
In this example, if the class is not U or D, we issue an error message. The jobs that are tested are jobs that begin with PAY* and are submitted from the PRD.PAY.ACCOUNT.DAILY.JOBS library from members that begin with DPAY*.
Fig.JV.3.25 DO MSG Parameter Example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC Warns that accounting jobs must run with class D and U. |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON JOB CLASS PRTY USER |
| ACCOUNT O/N |
|=============================================================================|
| IF %%$JOBCLS NE 'D' |
| IF %%$JOBCLS NE 'U' |
| DO MSG TYPE E Accounting jobs must run with class D or U. |
| ENDIF |
| ENDIF |
|=============================================================================|
DO ADJMSG: Action Parameter
Suppresses Control-M JCL Verify messages or changes their severity in a dynamic manner.
If a static adjustment of messages is sufficient, with no need to set conditions for message adjustments, you can use the alternative CTJEMSG member. For more information, see Adjusting Messages. If you set up both types of message adjustments, dynamic message adjustments take precedence over static message adjustments.
The DO ADJMSG parameter is relevant for site standards only.
DO ADJMSG is available for the following ON statements: DD, EXEC, INIT, JOB, and JCLLIB. Message adjustments are put into effect according to the scope of the ON statement:
-
For an ON DD statement, message adjustment is in effect only until the end of the DD that triggers the rule.
-
For an ON EXEC statement, message adjustment is in effect only until the end of the step.
-
For an ON JOB, ON INIT, or ON JCLLIB statement, message adjustment is in effect until the end of the job.
If two rules trigger adjustments to the same message, precedence is determined according to the following criteria:
-
Type of rule - DD rules have the highest priority, followed by EXEC, JCLLIB, JOB, and INIT.
-
(For rules of the same type) Values set in the general parameters and common selection parameters of the rule, as discussed in Rule search criteria. For example, message adjustments will be performed according to the rule with the higher priority and higher level of detail in the selection fields.
The valid format is
ADJMSG MSGID msgid SUPPRESS _ (y/n) SEVERITY _ (E/W/I)
where
-
msgid is the 7-character message ID for the Control-M JCL Verify message that you want to adjust. The message ID must begin with CTJ*.
-
SUPPRESS - whether to suppress the message, either Y (yes) or N (no)
-
SEVERITY - adjusted level of severity for the message: E (error), W (warning), or I (information)
When SUPPRESS is set to Y, SEVERITY is ignored.
This parameter is optional. To activate it, use the following steps:
-
Type ADJMSG in the DO field, and press Enter.
Several additional fields are displayed (MSGID, SUPPRESS, and SEVERITY).
-
In the MSGID field, enter the message ID for the message that you want to adjust.
Certain messages are restricted and cannot be adjusted. For a list of messages that you cannot adjust, see Restricted Messages.
-
In the SUPPRESS field, enter either Y or N.
-
In the SEVERITY field, enter a new severity for the message - E, W, or I.
-
Press Enter.
In this example, when the ddname is TTCNTL and it is used under PGM=IEF000, message CTJD05W, "DSN not found," is suppressed.
Fig.JV.3.25a DO ADJMSG Parameter Example
+-----------------------------------------------------------------------------+
| RULE ADJMSG ENVIRONMENT GENERAL PRIORITY 50 CONTINUE SEARCH Y |
| DESC |
| =========================================================================== |
| JOBNAME * |
| LIBRARY * MEMBER |
| SCHDLIB SCHDTAB O/N |
| =========================================================================== |
| ON DD TTCNTL DSN |
| DISP UNIT VOL |
| SMS CLASS DATA STORAGE MANAGEMENT O/N |
| =========================================================================== |
| O N T Y P E S: |
| |
| INIT END |
| JOB INCLUDE JCLLIB |
| EXEC PROC STEPEND |
| DD DDSYSIN DDSYSOUT |
| =========================================================================== |
| IF %%$EXECPROG EQ IEF000 |
| DO ADJMSG MSGID CTJD05W SUPPRESS Y SEVERITY |
| ENDIF |
| DO |
| =========================================================================== |
Restricted Messages
The messages that you adjust (that is, suppress or change their severity) must be Control-M JCL Verify messages, which begin with CTJ*.
For detailed information about Control-M JCL Verify messages, see the INCONTROL for z/OS Messages Manual.
The following messages are restricted and cannot be adjusted:
-
CTJA0*
-
CTJDS8S
-
CTJDS7S
-
CTJD03S
-
CTJD04S
-
CTJD0AS
-
CTJD0HS
-
CTJD0JS
-
CTJD0SS
-
CTJER*
-
CTJE0*
-
CTJE1*
-
CTJL0*
-
CTJM0*
-
CTJM1*
-
CTJM2*
-
CTJM3*
-
CTJO00E
-
CTJU0*
-
CTJV0*
-
CTJ00*
-
CTJ10*
-
CTJ20*
DO ONTYPE: Action Parameter
Specifies the starting position of a JCL statement type (JOB, EXEC, DD) in the JCL statement. For reformatting only. The valid format is
ONTYPE FROM value
where
-
value can be a number from 12 up to and including 16. Default is 12.
Optional. Type ONTYPE in the DO field, and press Enter. The FROM field is displayed. Enter a value within the valid range.
When DO ONTYPE is not specified in the rule, the JCL statement will not be changed.
DO POS: Action Parameter
Specifies the start of the first positional and the end of the last positional and maximum number of positionals in a JCL statement. For reformatting only. The valid format is
POS FROM start_value TO end_value # OF POS max
where
-
start_value specifies the start of the first positional and can be a number from 15 up to and including 68. Default is 16.
-
end_value specifies the end of the last positional can be a number from 18 up to and including 71. Default is 71.
-
max specifies the maximum number of positionals in a JCL statement and can be a number from 1 up to and including 9. Default is a blank.
Optional. Type POS in the DO field, and press Enter. The FROM, TO, and # OF POS fields are displayed. Enter a valid values.
When DO POS is not specified in the rule, the default is as follows:
-
When only DO MSG and/or DO SET are specified in the rule, the JCL statement will not be changed after reformatting.
-
When one or more of the other reformatting DO actions are specified, for example DO ARRANGE, the default is FROM 16 TO 71.
DO RETURN: Action Parameter
Exits from the rule and returns to Control-M JCL Verify to continue with the next rule.
The valid format is
RETURNRC 0000 RS X' 0000 '
where RC refers to the highest return code attained up until the current point in the procedure, and RS refers to the highest reason code (expressed in HEX code) attained up until the current point in the procedure.
Optional. Type RETURN in the DO field, and press Enter.
In this example, we ensure that all the datasets of the Payment Department jobs have a HLQ of PAYDY, all the datasets are on 3390 disks, and the space is always allocated in TRKS only. After the test, the process exits from the rule and returns to Control-M JCL Verify.
Fig.JV.3.26 DO RETURN example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC Checks files of payable jobs |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON DD * DSN * |
| DISP UNIT VOL |
| SMS CLASS DATA STORAGE MANAGEMENT O/N |
|=============================================================================|
| IF %%$SUBSTR %%$DDDSN 1 6 NE 'PAYDY.' |
| DO MSG TYPE E Invalid HLQ for payable system files. |
| ENDIF |
| IF %%$DDUNIT NE '3390' |
| DO MSG TYPE I UNIT should be 3390 for all payable files. |
| ENDIF |
| IF %%$GETWORD %%$SPCUNIT 1 ' ' NE TRKS |
| DO MSG TYPE I SPACE should be allocated in TRKS only. |
| ENDIF |
| RETURN RC 0000 RS X' 0000 ' |
|=============================================================================|
DO ENDSTMT: Action Parameter
Exits from the rule and continues with the next JCL statement.
The valid format is
ENDSTMTRC 0000 RS X' 0000 '
where RC refers to the highest return code attained up until the current point in the procedure, and RS refers to the highest reason code (expressed in HEX code) attained up until the current point in the procedure.
Optional. Type ENDSTMT in the DO field, and press Enter.
DO QUITMEM: Action Parameter
Exits from the rule and continues with the next job or procedure.
The valid format is
QUITMEM RC 0000 RS X' 0000 '
where
-
RC is the return code for the exit from verification or enforcement, according to the following logic:
-
If you specify a four-digit numeric RC value, this value is returned only if it is the highest value up to the current point. If a higher RC value was returned earlier in the procedure, that value is returned.
-
If the value begins with an asterisk (for example, RC=*003), this value is returned, and it overrides any earlier RC values (even if a higher RC value was returned earlier). In this case, the specified RS value also overrides any earlier RS values.
-
-
RS is the reason code (expressed in HEX code) for the exit from verification or enforcement, with the following logic:
-
If the RC value has 4 digits, then this RS value is returned only if it is the highest value up to the current point. If a higher RS value was returned earlier in the procedure, that value is returned.
-
If the RC value begins with an asterisk, this RS value overrides any earlier RS values, even if a higher RS value was returned earlier.
-
Optional. Type QUITMEM in the DO field, and press Enter.
DO REXX: Action Parameter
Calls REXX EXECs.
The valid format is
DO REXXMEM exec LIB library PARM parameters
where
-
exec (optional) is the member name of the REXX EXEC
-
library is the library name where the EXEC resides. If LIB is not specified then the EXEC is searched in DD CARD SYSEXEC.
-
parameters (optional) are the parameters passed to the EXEC
Optional. Type REXX in the DO field, and press Enter.
In this example, we ensure that all the datasets of the Payment Department jobs have a HLQ of PAYDY. After the test, the process calls the TEST1 user exit, with the arguments, ARG1, ARG2, and ARG3.
Fig.JV.3.27 DO REXX example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC Checks files of payable jobs |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON DD * DSN * |
| DISP UNIT VOL |
| SMS CLASS DATA STORAGE MANAGEMENT O/N |
|=============================================================================|
| IF %%$SUBSTR %%$DDDSN 1 6 NE 'PAYDY.' |
| DO MSG TYPE E Invalid HLQ for payable system files. |
| ENDIF |
| DO REXX MEM TEST1 LIB SYS2.CLIST |
| PARM ARG1 ARG2 ARG3 |
|=============================================================================|
DO SET: Action Parameter
Assigns a value to a variable.
The following format is used:
SET var = operand
where operand is a variable, constant, or built-in function.
Optional. Type SET in the DO field and press Enter.
While the user cannot change SYSTEM variables using DO SET, various built-in functions can be used to assign values to the other variable types. For more information, see Built-in functions for DO statements.
General Information
The DO SET parameter permits setting of values to variables (or symbols). These variables can then be referenced in other DO statements in the rule definition during rule activation.
In this example, if the account field in the job card is empty, we update it to "0000". The jobs that are tested are jobs that begin with PAY* and are submitted from PRD.PAY.ACCOUNT.DAILY.JOBS library from members that begin with DPAY*.
Fig.JV.3.28 DO SET Example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC Enforces account information |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON JOB CLASS PRTY USER |
| ACCOUNT O/N |
|=============================================================================|
| IF %%JOB_ACT EQ '' |
| DO MSG TYPE E Account field is empty.Automatically filled with "0000". |
| DO SET %%JOB_ACT = '0000' |
| ENDIF |
|=============================================================================|
ENVIRONMENT: General Parameter
Name of the environment where the rule applies. Using the ENVIRONMENT parameter, the user can limit the processing to use only the rules in which the particular environment name is specified. The environment can be specified with up to 8 alphanumeric characters (A-Z, 0-9, uppercase only).
General Information
The ENVIRONMENT parameter is mandatory.
To create a general rule that applies to all environments, enter the keyword GENERAL in the ENVIRONMENT field.
If an environment is specified with the invocation parameters, both the rules that have been defined for the particular environment and the rules that have been defined with the GENERAL keyword are applied in the processing. If an environment is not specified, only the rules that have been defined with the GENERAL keyword are applied.
The ENVIRONMENT parameter determines the order of searching the rules. If the validation is performed with a specific environment name, the rules with the specified environment name will be invoked before the GENERAL ones.
In this example, we ensure that in the PROD environment, all the datasets of the Payment Department jobs have a HLQ of PAYDY, all the datasets are on 3390 disks, and the space is always allocated in TRKS only.
Fig.JV.3.29 ENVIRONMENT example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC Checks files of payable jobs |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON DD * DSN * |
| DISP UNIT VOL |
| SMS CLASS DATA STORAGE MANAGEMENT O/N |
|=============================================================================|
| IF %%$SUBSTR %%$DDDSN 1 6 NE 'PAYDY.' |
| DO MSG TYPE E Invalid HLQ for payable system files. |
| ENDIF |
| IF %%$DDUNIT NE '3390' |
| DO MSG TYPE I UNIT should be 3390 for all payable files. |
| ENDIF |
| IF %%$GETWORD %%$SPCUNIT 1 ' ' NE TRKS |
| DO MSG TYPE I SPACE should be allocated in TRKS only. |
| ENDIF |
| RETURN RC 0000 RS X' 0000 ' |
|=============================================================================|
JOBNAME: Common Selection Parameter
Name of the job (as appears in the JOB statement).
To trigger this rule on procedure members, specify an asterisk (*) in this field.
General Information
This optional selection parameter is common to all the various ON parameter types.
In this example, we ensure that all the jobnames that begin with PAY have a HLQ of PAYDY, all the datasets are on 3390 disks, and the space is always allocated in TRKS only.
Fig.JV.3.30 JOBNAME example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC Check files of payable jobs |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON DD * DSN * |
| DISP UNIT VOL |
| SMS CLASS DATA STORAGE MANAGEMENT O/N |
|=============================================================================|
| IF %%$SUBSTR %%$DDDSN 1 6 NE 'PAYDY.' |
| DO MSG TYPE E Invalid HLQ for payable system files. |
| ENDIF |
| IF %%$DDUNIT NE '3390' |
| DO MSG TYPE I UNIT should be 3390 for all payable files. |
| ENDIF |
| IF %%$GETWORD %%$SPCUNIT 1 ' ' NE TRKS |
| DO MSG TYPE I SPACE should be allocated in TRKS only. |
| ENDIF |
| RETURN RC 0000 RS X' 0000 ' |
|=============================================================================|
LIBRARY: Common Selection Parameter
Name of the library where the JCLs reside.
This is also the MEMLIB, if invoked from a Control-M/EM interface.
General Information
This optional selection parameter is common to all the various ON parameter types.
In this example, we ensure that all the jobs in the PRD.PAY.ACCOUNT.DAILY.JOBS library, with jobnames which begin with PAY, have a HLQ of PAYDY, all the datasets are on 3390 disks, and the space is always allocated in TRKS only.
Fig.JV.3.31 LIBRARY example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC Checks files of payable jobs |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON DD * DSN * |
| DISP UNIT VOL |
| SMS CLASS DATA STORAGE MANAGEMENT O/N |
|=============================================================================|
| IF %%$SUBSTR %%$DDDSN 1 6 NE 'PAYDY.' |
| DO MSG TYPE E Invalid HLQ for payable system files. |
| ENDIF |
| IF %%$DDUNIT NE '3390' |
| DO MSG TYPE I UNIT should be 3390 for all payable files. |
| ENDIF |
| IF %%$GETWORD %%$SPCUNIT 1 ' ' NE TRKS |
| DO MSG TYPE I SPACE should be allocated in TRKS only. |
| ENDIF |
| RETURN RC 0000 RS X' 0000 ' |
|=============================================================================|
MEMBER: Common Selection Parameter
Name of the member name in the library.
This is also the MEMNAME, if invoked from a Control-M/EM interface.
General Information
This optional selection parameter is common to all the various ON parameter types.
In this example, we ensure that all the jobs in the PRD.PAY.ACCOUNT.DAILY.JOBS library, in members beginning with DPAY, and with jobnames which begin with PAY, have a HLQ of PAYDY, all the datasets are on 3390 disks, and the space is always allocated in TRKS only.
Fig.JV.3.32 MEMBER example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC Checks files of payable jobs |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON DD * DSN * |
| DISP UNIT VOL |
| SMS CLASS DATA STORAGE MANAGEMENT O/N |
|=============================================================================|
| IF %%$SUBSTR %%$DDDSN 1 6 NE 'PAYDY.' |
| DO MSG TYPE E Invalid HLQ for payable system files. |
| ENDIF |
| IF %%$DDUNIT NE '3390' |
| DO MSG TYPE I UNIT should be 3390 for all payable files. |
| ENDIF |
| IF %%$GETWORD %%$SPCUNIT 1 ' ' NE TRKS |
| DO MSG TYPE I SPACE should be allocated in TRKS only. |
| ENDIF |
| RETURN RC 0000 RS X' 0000 ' |
|=============================================================================|
ON DD: Event Selection Parameter
Specifies that the rule is triggered by a DD statement. Used to validate the DD statement. Relevant only for site standards and enforcement. Enforcement differs from site standards in that enforcement will not be triggered on DD SYSIN with data instream and DD SYSOUT.
Optional. Type DD in the ON field and press Enter. The subparameters (selection Fields) shown below are displayed.
Tab.JV.3.21 ON DD Subparameters
Subparameter |
Description |
---|---|
DDNAME |
The DD card name |
DSN |
The dataset referred to by the card |
DISP |
The specified dataset disposition. The valid values are:
|
UNIT |
The specified UNIT |
VOL |
The specified Volume Serial. There are four VOLSERS for each ON statement and the relation between these VOLSERS is OR logic, so that if at least one of the volsers satisfy the criteria, the DO statement will be activated. If you use N (Not) at the END of the ON statement, it affects the next four VOLSERS. |
SMS CLASS |
One of the following classes:
|
O/N |
Conjunctional subparameter that permits linking of ON statements. Valid values are:
|
The JCL statement (DD card) variables that can be used with the ON DD statement are shown below.
Tab.JV.3.22 ON DD variables
Variab |
Description |
---|---|
Variable |
Description |
%%$DDNAME |
DD card DDNAME - Data definition name |
%%$DDDSN |
Dataset name A temporary dataset, starting with a prefix of &&* and followed by a number, is used when the DSN keyword does not exist in the JCL DD statement. In this case, the %%$DDDSN variable shows this temporary value. Example: Copy
|
%%$DDDSNMEM |
Member name, if specified |
%%$DDDSNGEN |
Generation number, if specified |
%%$DDDSN# |
Number of qualifiers in dataset name |
%%$DDDSNn |
Qualifiers n in dataset name |
%%$DDDTCLS |
Dataset data class value |
%%$DDMNGCLS |
Dataset management class value |
%%$DDSTORCLS |
Dataset storage class value |
%%$DDDISP1 |
Dataset first disposition value |
%%$DDDISP2 |
Dataset second disposition value |
%%$DDDISP3 |
Dataset third disposition value |
%%$DDNTYPE |
DD card type. If it is a DUMMY DD card, its value is D. |
%%$DDUNIT |
Dataset UNIT value |
%%$DDVOLn |
Dataset VOLUME value - n is the seq. |
%%$DDVOL# |
Number of Dataset VOLUME value |
%%$SPCUNIT |
Dataset space unit |
%%$SPCPRI |
Dataset space primary value |
%%$SPCSEC |
Dataset space secondary value |
%%$SPCDIR |
Dataset space directory blocks value |
%%$DSORG |
Dataset DSORG value |
%%$RECFM |
Dataset RECFM value |
%%$LRECL |
Dataset LRECL value |
%%$BLKSZ |
Dataset BLKSZ value |
%%$DDCONCAT |
Contains Y if the DD statement is part of a concatenation of DDs. |
%%$DDCONNUM |
When %%$DDCONCAT is set to Y, this field contains the DD sequence number in the concatenation |
In this example, we ensure that all the jobs in the PRD.PAY.ACCOUNT.DAILY.JOBS library, in members beginning with DPAY, and with jobnames which begin with PAY, have a HLQ of PAYDY, all the datasets are on 3390 disks, and the space is always allocated in TRKS only.
Fig.JV.3.33 ON DD example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC check files of payable jobs |
| DESC |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON DD * DSN * |
| DISP UNIT VOL |
| SMS CLASS DATA STORAGE MANAGEMENT O/N |
|=============================================================================|
| IF %%$SUBSTR %%$DDDSN 1 6 NE 'PAYDY.' |
| DO MSG TYPE E Invalid HLQ for payable system files. |
| ENDIF |
| IF %%$DDUNIT NE '3390' |
| DO MSG TYPE I UNIT should be 3390 for all payable files. |
| ENDIF |
| IF %%GETWORD %%$SPCUNIT 1 ' ' NE TRKS |
| DO MSG TYPE I SPACE should be allocated in TRKS only. |
| ENDIF |
| RETURN RC 0000 RS X' 0000 ' |
|=============================================================================|
ON DDSYSIN: Event Selection Parameter
Specifies that the rule is triggered by a SYSIN DD statement (either DD * or DD DATA). Used to validate the SYSIN DD statements. Relevant only for site standards and enforcement. Site standards differs from enforcement in that site standards will not be triggered by data instream, but will be invoked for the entire concatenated DDNAME.
Optional. Type DDSYSIN in the ON field and press Enter.
The following selection fields (subparameters) are displayed:
-
ddname - the SYSIN DD name
-
DLM - the end of SYSIN delimiter string
The following JCL statement (JOB card) variable can be used with the ON DDSYSIN statement:
-
%%$INTYPE - the SYSIN type (* or D for "DATA")
In this example a message is displayed for each SYSIN DD statement.
Fig.JV.3.34 ON DDSYSIN example
+-----------------------------------------------------------------------------+
| RULE TH006 ENVIRONMENT THOM PRIORITY 50 CONTINUE SEARCH Y |
| DESC |
| =========================================================================== |
| JOBNAME BMC459* |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB O/N |
| =========================================================================== |
| ON DDSYSIN * DLM * O/N |
| =========================================================================== |
| DO MSG TYPE I INTYPE = %%$INTYPE |
| DO |
ON DDSYSOUT: Event Selection Parameter
Specifies that the rule is triggered by a SYSOUT DD statement set to a specific value. Used to validate the DD statement with SYSOUT equal to the specified value. Relevant only for site standards and enforcement.
Optional. Type DDSYSOUT in the ON field and press Enter.
The following selection fields (subparameters) are displayed:
-
ddname - the SYSOUT DD name
-
CLASS - The SYSOUT class
The following JCL statement (JOB card) variable can be used with the ON DDSYSOUT statement:
-
%%$DDSYSOUT - the SYSOUT information
In this example a message with the SYSOUT information is displayed for SYSOUT DD statements labelled P and SYSOUT class P.
Fig.JV.3.35 ON DDSYSOUT example
+-----------------------------------------------------------------------------+
| RULE DDSYSOUT ENVIRONMENT GENERAL PRIORITY 50 CONTINUE SEARCH Y |
| DESC DDSYSOUT |
| =========================================================================== |
| JOBNAME * |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB O/N |
| =========================================================================== |
| ON DDSYSOUT P CLASS P O/N |
| =========================================================================== |
| DO MSG TYPE I OUTTYPE = %%$DDSYSOUT |
| DO |
ON EXEC: Event Selection Parameter
Specifies that the rule is triggered by an EXEC statement. Used to validate the EXEC statement.
Optional. Type EXEC in the ON field and press Enter. The following subparameters (selection Fields) are displayed.
Tab.JV.3.23 ON EXEC Subparameters
Subparameter |
Description |
---|---|
PGM |
The invoked program |
PROC |
The invoked JCL procedure |
O/N |
Conjunctional subparameter that permits linking of ON statements. Valid values are:
|
The JCL statement (EXEC card) variables that can be used with the ON EXEC statement are shown below.
Tab.JV.3.24 ON EXEC variables
Variable |
Description |
---|---|
%%$STEPNAME |
Step name from the EXEC JCL statement |
%%$PROCSTEP |
Step name from the EXEC JCL statement within the procedure |
%%$STEPNUM |
Sequential number of the step in the JOB |
%%$EXECPROG |
Program name |
%%$EXECPROC |
Procedure name |
%%$EXECREGN |
Step's region size |
%%$EXECTIME |
Step's max CPU value |
%%$EXECPARM |
The PARAM value (up to 100 characters) |
The user-defined variables that can be used with the ON EXEC statement are shown below.
Tab.JV.3.25 ON EXEC user-defined variables
Variable |
Description |
---|---|
%%EXMEMLMT |
Step's memory limit above the BAR |
%%EXPERFORM |
Step's WLM class |
In this example we check that no parameters are passed to the payment programs (note the use of O/N in the 2nd and 3rd sections).
Fig.JV.3.36 ON EXEC Example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 03 CONTINUE SEARCH Y |
| DESC NO PARAMETERS ARE ALLOWED TO BE PASSED TO THE PAYMENT PROGRAMS |
| DESC |
| =========================================================================== |
| JOBNAME PAY* |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS MEMBER DPAY* |
| SCHDLIB SCHDTAB O/N O |
| JOBNAME PAY* |
| LIBRARY PRD.PAY.ACCOUNT.YEARLY.JOBS MEMBER DPAY* |
| SCHDLIB SCHDTAB O/N O |
|=============================================================================|
| ON EXEC PGM PROC DAYP* O/N O |
| ON EXEC PGM PROC YEARP* O/N |
|=============================================================================|
| IF %%$EXECPARM NE '' |
| DO MSG TYPE E IT IS NOT PERMITTED TO PASS PARMS TO THESE PROGRAMS. |
| DO |
| ENDIF |
| DO |
======= >>>>>>>>>>>>>>> END OF JRLE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
ON INCLUDE: Event Selection Parameter
Specifies that the rule is triggered by an INCLUDE statement. Used to validate the INCLUDE statements.
Optional. Type INCLUDE in the ON field and press Enter.
The following selection field (subparameter) is displayed:
-
MEMBER - The included member name
The following JCL statement (JOB card) variable can be used with the ON INCLUDE statement:
-
%%$INCLMEM - contains the name of the member to be included
In this example, when a job contains an INCLUDE statement, the name of the member to be included is displayed in the output message.
Fig.JV.3.37 INCLUDE example
+-----------------------------------------------------------------------------+
| RULE TH015 ENVIRONMENT THMSD PRIORITY 50 CONTINUE SEARCH Y |
| DESC |
| DESC |
|=============================================================================|
| JOBNAME * |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON INCLUDE O/N |
|=============================================================================|
| DO MSG TYPE I INCLMEM = %%$INCLMEM |
| DO |
|=============================================================================|
ON JCLLIB: Event Selection Parameter
Specifies that the rule is triggered by a JCLLIB statement. Used to validate the JCLLIB statements.
Optional. Type JCLLIB in the ON field and press Enter.
The ON JCLLIB statement has the following subparameter:
-
JCLLIB - The JCL library name.
The following JCL statement variable can be used with the ON JCLLIB statement:
-
%%$LIBDSNn - contains the dataset sequence number, according to the sequence that the datasets are defined in the JOB statements
-
%%$LIBDSN# - contains the total number of datasets defined in the JOB statements
In this example, when a job contains a JCLLIB statement, the total number of datasets and the dataset sequence numbers are displayed in the output message.
Fig.JV.3.38 JCLLIB example
+-----------------------------------------------------------------------------+
| RULE TH012 ENVIRONMENT THMSB PRIORITY 50 CONTINUE SEARCH Y |
| DESC |
| DESC |
|=============================================================================|
| JOBNAME * |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON JCLLIB O/N |
|=============================================================================|
| DO MSG TYPE I LIBDSN# = %%$LIBDSN# |
| DO MSG TYPE I LIBDSN1 = %%$LIBDSN1 |
| DO MSG TYPE I LIBDSN2 = %%$LIBDSN2 |
| DO |
|=============================================================================|
ON JOB: Event Selection Parameter
Specifies that the rule is triggered by a JOB statement. Used to validate the JOB statement.
Optional. Type JOB in the ON field and press Enter. The following subparameters (selection Fields) are displayed.
Tab.JV.3.26 ON JOB Subparameters
Subparameter |
Description |
---|---|
CLASS |
The job's class |
PRTY |
The job's priority |
USER |
The job's user ID |
ACCOUNT |
The job's account |
O/N |
Conjunctional subparameter that permits linking of ON statements. Valid values are:
|
The JCL statement (JOB card) variables that can be used with the ON JOB statement are shown below.
Tab.JV.3.27 ON JOB variables
Variable |
Description |
---|---|
%%$JOBNAME |
The job name taken from the JOB card |
%%$JOBACNT |
The account information |
%%$JOBPGMR |
The programmer name |
%%$JOBCLS |
The JOB class value |
%%$JOBPRTY |
The JOB priority value |
%%$JOBMSGC |
The JOB msgclass value |
%%$JOBMSGL |
The JOB msglevel value |
%%$JOBREGN |
The JOB region size |
%%$JOBTIME |
The JOB max CPU value |
%%$JOBUSER |
The user name value |
%%$JOBMEMLMT |
The memory limit above the BAR |
%%$JOBPERFORM |
The WLM class for the job |
%%$JOBRESTART |
The JOB RESTART value |
%%$JOBNOTIFY |
The JOB NOTIFY value |
%%$JOBRD |
The JOB RD value |
%%$JOBADDRSPC |
The JOB ADDRSPC value |
In this example, the job processing time for all jobs belonging to user EB38 are measured. If greater than 1000, the job processing time is displayed in the output message.
Fig.JV.3.39 ON JOB Example
+-----------------------------------------------------------------------------+
| RULE PRODXYZ ENVIRONMENT GENERAL PRIORITY 50 CONTINUE SEARCH Y |
| DESC JOB PROCESSING TIME |
| DESC |
|=============================================================================|
| JOBNAME * |
| LIBRARY IOA.JCL MEMBER PRODXYZ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON JOB CLASS PRTY USER EB38 |
| ACCOUNT O/N |
|=============================================================================|
| IF %%$JOBTIME GT# 1000 |
| DO MSG TYPE I THIS JOB TAKES %%$JOBTIME TO PROCESS. |
| DO |
| ENDIF |
| DO |
======= >>>>>>>>>>>>>>> END OF JRLE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
ON END: Event Selection Parameter
Specifies that the rule is triggered when a JCL job is ending. If the member contains multiple jobs, the rule is triggered at the end of each job or procedure in the member. Used, for example, for cross JCL validations and counter checking. Relevant only for site standards and enforcement. Only supports the addition of new records in enforcement, using IAFTER and IBEFORE.
Optional. Type END in the ON field and press Enter.
The ON END statement does not require any subparameters so there are no selection fields displayed.
All variables, of any type, with their latest values can be used with the ON END statement.
In this example, when jobs are ending, their return and reason codes are displayed in the output message.
Fig.JV.3.40 END example
+-----------------------------------------------------------------------------+
| RULE TH010 ENVIRONMENT THMSA PRIORITY 50 CONTINUE SEARCH Y |
| DESC |
| DESC |
|=============================================================================|
| JOBNAME * |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON END |
|=============================================================================|
| DO MSG TYPE I RC = %%$RC RS = %%$RS |
| DO |
|=============================================================================|
ON INIT: Event Selection Parameter
Specifies that the rule is triggered when a JCL job is about to be processed. If the member contains multiple jobs, the rule is triggered at the beginning of each job or procedure in the member. Used to initialize user variables (for example, counters). Relevant only for site standards and enforcement. Only supports the addition of new records in enforcement, using IAFTER and IBEFORE.
Optional. Type INIT in the ON field and press Enter.
The ON INIT statement does not require any subparameters so there are no selection fields displayed.
The following variables can be used with the ON INIT statement:
Variable Type |
Variable |
Description |
---|---|---|
JCL statement (JOB card) variable |
%%$JOBNAME |
The job name taken from the JOB card |
System variable |
%%$CMNTn |
The comment card of the corresponding number:
|
In this example, when a JCL job is about to be processed, information about the job is displayed in output messages.
Fig.JV.3.41 INIT example
+-----------------------------------------------------------------------------+
| RULE STARTJOB1 ENVIRONMENT THMSA PRIORITY 50 CONTINUE SEARCH Y |
| DESC |
| DESC |
|=============================================================================|
| JOBNAME M4918* |
| LIBRARY MEMBER |
| SCHDLIB CTM.PROD.BKP(SPBKP) SCHDTAB O/N |
|=============================================================================|
| ON INIT |
|=============================================================================|
| DO MSG TYPE I JCLTYPE = %%#JCLTYPE; MEMBER = %%#MEMBER |
| DO MSG TYPE I LIBRARY = %%#LIBRARY; ENVRN = %%#ENVRN |
| DO MSG TYPE I SCHDLIB = %%#SCHDLIB; SCHDTAB = %%#SCHDTAB |
| DO MSG TYPE I SCHDJOB = %%#SCHDJOB; STATNUM = %%#STATNUM |
| RETURN RC 0012 RS X' 0024 ' |
| DO |
|=============================================================================|
ON PROC: Event Selection Parameter
Specifies that the rule is triggered by a procedure.
ON PROC is relevant only for in-stream procedures and standalone procedures (without a job card). It cannot be used for cataloged procedures.
Optional. Type PROC in the ON field and press Enter.
The following selection field (subparameter) is displayed:
-
PROC - The procedure name
The following JCL statement (JOB card) variable can be used with the ON PROC statement:
-
%%$PROCNAME - contains the procedure name
In this example, the name of the procedure is displayed in the output message.
Fig.JV.3.42 ON PROC example
+-----------------------------------------------------------------------------+
| RULE TH010 ENVIRONMENT THMSA PRIORITY 50 CONTINUE SEARCH Y |
| DESC |
| DESC |
|=============================================================================|
| JOBNAME M4918* |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON PROC O/N |
|=============================================================================|
| DO MSG TYPE I PROCNAME = %%$PROCNAME |
| DO |
|=============================================================================|
ON STEPEND: Event Selection Parameter
Specifies that the rule is triggered when a JCL step is ending. Used, for example, for cross JCL validations and counter checking. Available for site standards and enforcement rules only. Under enforcement, only supports the addition of new records, using IAFTER and IBEFORE.
Optional. Type STEPEND in the ON field and press Enter.
The following selection field (subparameter) is displayed:
-
STEPNAME - The JCL step name
All variables, of any type, with their latest values can be used with the ON STEPEND statement.
RULE: General Parameter
Name of a rule as specified in the entry panel. The name must be unique in the rule table, and therefore you cannot define two rules in the same table with the same rule name.
General Information
The RULE parameter does not operate as a selection parameter. It serves to identify the rule.
In this example, the rule named DAILYPAY checks that no parameters are passed to the payment programs.
Fig.JV.3.43 RULE Example
+-----------------------------------------------------------------------------+
| RULE DAILYPAY ENVIRONMENT PROD PRIORITY 3 CONTINUE SEARCH Y |
| DESC No parameters are allowed to be passed to the payment programs |
|=============================================================================|
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.DAILY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
| JOBNAME PAY*____ _ |
| LIBRARY PRD.PAY.ACCOUNT.YEARLY.JOBS__________________ MEMBER DPAY*___ |
| SCHDLIB SCHDTAB O/N |
|=============================================================================|
| ON EXEC PGM PROC DAYP* O/N O |
| ON EXEC PGM PROC YEARP* O/N |
|=============================================================================|
| IF %%$EXECPARM NE '' |
| DO MSG TYPE E It is not permitted to pass parms to these programs. |
| ENDIF |
|=============================================================================|
+====== >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< ====+
SCHDLIB: Common Selection Parameter
Name of the scheduling library when invoked from a Control-M/EM interface. For site standards only.
General Information
This optional selection parameter is common to all the various ON parameter types.
In this example, information about the jobs in the Control-M scheduling library, CTM.PROD.BKP(SPBKP), that are about to be processed, are displayed in output messages.
Fig.JV.3.44 SCHDLIB example
+-----------------------------------------------------------------------------+
| RULE STARTJOB1 ENVIRONMENT THMSA PRIORITY 50 CONTINUE SEARCH Y |
| DESC |
| DESC |
|=============================================================================|
| JOBNAME M4918* |
| LIBRARY MEMBER |
| SCHDLIB CTM.PROD.BKP(SPBKP) SCHDTAB O/N |
|=============================================================================|
| ON INIT |
|=============================================================================|
| DO MSG TYPE I JCLTYPE = %%#JCLTYPE; MEMBER = %%#MEMBER |
| DO MSG TYPE I LIBRARY = %%#LIBRARY; ENVRN = %%#ENVRN |
| DO MSG TYPE I SCHDLIB = %%#SCHDLIB; SCHDTAB = %%#SCHDTAB |
| DO MSG TYPE I SCHDJOB = %%#SCHDJOB; STATNUM = %%#STATNUM |
| RETURN RC 0012 RS X' 0024 ' |
| DO |
|=============================================================================|
SCHDTAB: Common Selection Parameter
Name of the scheduling table when invoked from a Control-M/EM interface. For site standards only.
The name does not refer to "folder" since "table" is still the term used with Control-M for z/OS.
General Information
This optional selection parameter is common to all the various ON parameter types.
In this example, information about the jobs in the Control-M scheduling table, PAYROLL, that are about to be processed, are displayed in output messages.
Fig.JV.3.45 SCHDTAB example
+-----------------------------------------------------------------------------+
| RULE STARTJOB1 ENVIRONMENT THMSA PRIORITY 50 CONTINUE SEARCH Y |
| DESC |
| DESC |
|=============================================================================|
| JOBNAME M4918* |
| LIBRARY MEMBER |
| SCHDLIB SCHDTAB PAYROLL O/N |
|=============================================================================|
| ON INIT |
|=============================================================================|
| DO MSG TYPE I JCLTYPE = %%#JCLTYPE; MEMBER = %%#MEMBER |
| DO MSG TYPE I LIBRARY = %%#LIBRARY; ENVRN = %%#ENVRN |
| DO MSG TYPE I SCHDLIB = %%#SCHDLIB; SCHDTAB = %%#SCHDTAB |
| DO MSG TYPE I SCHDJOB = %%#SCHDJOB; STATNUM = %%#STATNUM |
| RETURN RC 0012 RS X' 0024 ' |
| DO |
|=============================================================================|