CNTL
This command controls the general processing flow and characteristics of an EXEC.
Command | Parameters |
---|---|
CNTL | [CMD|NOCMD] [LIST|NOLIST] [PERLIM()] [TIMLIM()] [SELLIM()] [ELAPSLIM()] [MAXTPUT()] [GLOBAL|LOCAL] ERR|NOERR] |
Use this command for help in debugging BMC AMI Ops Automation EXECs. CNTL LIST causes all commands issued with the EXEC to be listed in the BBI-SS PA Journal log. See Testing-and-debugging-EXECs-interactively for more information about testing EXECs.
The following table describes the parameters:
Parameter | Function | Notes |
---|---|---|
CMD | Specifies that normal EXEC processing is in effect | Default |
LIST | Lists every EXEC command in the BBI-SS PAS log | n/a |
NOCMD | No action commands are processed | When NOCMD is in effect in the current CLIST, the following IMFEXEC commands are not executed: CMD, CICSTRAN, IMSTRAN, JESSUBM, RES CMD, RES EXIT, RES VCOMMAND, and RES VMCMD. A message is printed in the BBI-SS PAS Journal log informing you that the command would have been executed if this control request were not in effect. This method is an easy way to test new EXECs. |
NOLIST | Normal EXEC processing is in effect | Default |
PERLIM | Specifies the CPU percentage limit for the EXEC | If the CPU usage of an EXEC exceeds this value in any 15 second interval after the EXEC begins, the EXEC will be terminated. The CPU percentage is calculated based on the total CPU time available on 1 CPU within that 15 second interval. For example, 20% means 20% of 15 seconds. If the CPU time exceeds 3 seconds with any given 15 second interval, the EXEC will be terminated. The maximum CPU percentage usable is 100%, even on multiprocessor machines. Specifying 0 means no CPU percentage checking is performed. |
TIMLIM | Specifies the CPU time limit for the EXEC | If the EXEC exceeds this value in CPU seconds, it is terminated. Specifying 0 means no CPU time checking is performed. |
ELAPSLIM | Specifies the time limit for the EXEC | If an EXEC is still running after the specified number of minutes, BMC AMI OpsA cancels it. Messages that the EXEC has exceeded its time limit are written to the BBI journal. |
SELLIM | Limits the number of nested EXECs in the current EXEC thread. | This parameter applies only to nested EXECs scheduled with the IMFEXEC SELECT command using WAIT(YES). Specifying 0 means no limit checking is performed. |
MAXTPUT | Limits the number of TPUTs that can be issued from the current EXEC. | TPUTs occur when a REXX EXEC uses the TRACE command and when there are TSO/E error messages. Specifying 0 means no limit checking is performed. |
The use of the PERLIM, TIMLIM, SELLIM, ELAPSLIM, and MAXTPUT parameters in an EXEC overrides corresponding parameters set in the BBPARM member (as well as those dynamically updated by using the Dynamic Parameter Manager application) as follows: PERLIM overrides BBPARM member AAOEXPxx setting PEREXLIM TIMLIM overrides BBPARM member AAOEXPxx setting TIMEXLIM ELAPSLIM overrides BBPARM member AAOEXPxx setting ELAPSLIM SELLIM overrides BBPARM member AAOEXPxx setting SELLIM MAXTPUT overrides BBPARM member AAOEXPxx setting MAXTPUT | ||
GLOBAL | Propagate CNTL settings to all called EXECs. | When set, any EXEC scheduled through the IMFEXEC SELECT command inherits the CNTL settings of the current EXEC. |
LOCAL | All settings are local to this EXEC. | CNTL settings will not be propagated to EXECs called by this EXEC. |
ERR | Messages EM0022E and EM0025I are written to the journal. | ERR is the default. |
NOERR | Suppresses messages EM0022E and EM0025I from the journal | When NOERR is specified, the messages EM0022E and EM0025I will be suppressed for IMFEXEC statements only. The EM0022E and EM0025I messages are still issued for TSO and REXX statements. When NOERR is specified, the REXX Hostfail code (R15=16) is not set. Neither FAILURE nor ERROR conditions are set for the REXX instructions SIGNAL or CALL. The IMFCC variable must be used to check for error conditions. |
Condition codes are listed in the following table:
Value | Description |
---|---|
0 | Command was executed. |
8 | Invalid syntax was used. |
Example
This command causes echoing of all IMFEXEC commands and the termination of the EXEC if its total CPU time exceeds 5 seconds.
"IMFEXEC CNTL LIST TIMLIM(5)"
CLIST example:
Example of how to use the ELAPSLIM keyword to set an execution timeout limit:
/* set a 1 minute execution limit then wait 70 seconds */
"IMFEXEC CNTL ELAPSLIM(1)"
"IMFEXEC WAIT 70"
Example of how to use the ERR and NOERR keywords to suppress the EM022E message but still monitor for error conditions:
"IMFEXEC CNTL NOERR' /*prevent EM0022E */
"IMFEXEC ARY CONNECT MYARRAY UPDATE"
CONNECT = IMFCC
"IMFEXEC CNTL ERR" /*allow EM0022E for future IMFEXEC statements */
IF CONNECT /= 0 THEN
DO
IF CONNECT = 8 THEN
"IMFEXEC MSG 'ARRAY MYARRAY NOT FOUND'"
ELSE
DO
"IMFEXEC MSG 'UNABLE TO CONNECT TO ARRAY MYARRAY',
'- RETURN CODE =' CONNECT''"
END
END
ELSE
DO
"IMFEXEC MSG 'ARRAY MYARRAY CONNECT SUCCESSFUL'"
END
Related topic