Previous Topic: OPSCMD Return CodesNext Topic: OPSDOM Command Processor—Delete Operator Messages


OPSDELV Command Processor—Delete Global Variables

The OPSDELV command processor deletes global variables whose names match a name mask that you specify and returns the count of the deleted variables.

Note: As a result of OPSDELV, both the global variable values and the names of the global variables are deleted.

Unlike the OPSVALUE function used with the R (remove) action code, the OPSDELV command processor does not remove subnodes of the variable names. Only those variables whose names match the value of namemask are removed.

You can invoke OPSDELV as an OPS/REXX or TSO/E REXX function. The function has a single argument equal to the OPSDELV TSO command syntax. The value returned by the function is the count of deleted variables. CA OPS/MVS sets the OPSRC variable to the same return code that would have been generated if you had invoked OPSDELV as a TSO command.

OPSDELV has the following syntax:

OPSDELV {namemask}
[CMDRESP(TERMINAL|REXX|CLIST|NOWHERE|XDQ)]
[DELAY(0,seconds)]
[SUBSYS(OPSS,ssid)]
[SYSTEM(msfids|ALL|EXT)]
[SYSWAIT(seconds)]
[TOKEN]
namemask

For the namemask value, specify either a complete variable name or a variable name that includes one or both of the special characters described here. CA OPS/MVS searches through the global variables on the specified system and tries to find any names that match namemask.

The namemask can have the maximum global variable size in length, and is automatically converted to uppercase. You can use two special characters in the namemask:

The namemask that you specify can be either of the following:

Guidelines for specifying namemask:

Examples: namemask

GLOBAL0.ABCD*

Matches all CA OPS/MVS global variable names with twelve or more characters that begin with GLOBAL0.ABCD, such as GLOBAL0.ABCDEF.

TAPE_+++_STATUS

Matches all Automate-format variable names with 15 characters, where the sixth through eighth characters can be any character, and the other characters are equal to those in the mask, such as TAPE_280_STATUS.

+++

Matches all Automate-format variable names that are composed of three characters.

+++*

Matches all Automate-format variable names that are composed of three or more characters.

GLVTEMP1.*

Matches all CA OPS/MVS global variable names that begin with the stem GLVTEMP1.

CMDRESP

(Optional) Indicates how CA OPS/MVS handles the response from OPSDELV. Values are:

TERMINAL

Displays the response at the terminal.

REXX

Sets the variable OPSDLCNT to the number of variables that are deleted by the command.

CLIST

Sets the variable OPSDLCNT to the number of variables that are deleted by the command.

NOWHERE

Tells CA OPS/MVS to not issue any messages except error messages. This option is provided to eliminate messages in REXX programs.

XDQ

Places the messages that are normally written to the terminal into the REXX external data queue.

When you invoke your OPSDELV request as a TSO command, the default of CMDRESP is CMDRESP(TERMINAL).

When you invoke your OPSDELV request as an OPS/REXX or TSO/E REXX function, the default of CMDRESP is CMDRESP(NOWHERE).

DELAY

(Optional) Indicates the number of seconds that your OPSDELV request waits before it can be processed. You can specify any number of seconds from 1 to 300.

Default: 0 seconds

SUBSYS

(Optional) For more information about the SUBSYS keyword, see Specify a Subsystem ID on a POI Command Processor.

SYSTEM

(Optional) For more information about the SYSTEM keyword, see Specify an MSF System ID on a POI Command Processor.

Note: If more than one system is specified or implied, and the local system is one of the systems that receives the request, then CA OPS/MVS returns only the count for the local system.

SYSWAIT

(Optional) For a cross-system request, the SYSWAIT keyword specifies the number of seconds for CA OPS/MVS to wait for the remote system to receive and respond to the OPSDELV request.

Default: The value of the MSFSYSWAIT parameter; you can specify any number of seconds from 1 to 600.

TOKEN

(Optional) Lets you delete a single variable, if the variable has not been updated since the last time it was retrieved with an OPSGETV command and the TOKEN keyword. The value that is specified for the TOKEN keyword is compared to the current update count for the variable. If the values match, the variable is deleted. If the values do not match, the requested deletion is rejected.

OPSDELV Installation Requirements

OPSDELV Utilization Environments

OPSDELV Sample Coding Statements

This example finds all variables with names that match the mask, deletes them, and displays the number of deleted variables at the terminal:

OPSDELV GLOBAL0.XYZ+ABC*

This REXX function finds all global variables with names that match the mask and deletes them. Since SYSTEM(ALL) is specified, CA OPS/MVS sends the request to all systems that are connected through the MSF or CCI (CAICCI) communications protocols. The cnt variable is set to the number of variables deleted on the local system. The OPSRC variable is set to the same return code that would have been set if you had invoked OPSDELV as a TSO command:

cnt = OPSDELV ('GLOBAL0.XYZ* SYSTEM(ALL)')

OPSDELV Return and Reason Codes

OPSDELV produces these return codes:

Return Code

Description

0

The command executed successfully.

4

The command failed due to errors.

12

The CA OPS/MVS product is inactive.

40

You invoked the OPSDELV request as a REXX function, and it included an invalid REXX function argument.