Previous Topic: Usage Notes for OPSGETVL

Next Topic: Keywords for OPSHFI

OPSHFI Function

The OPSHFI function reads global variables from a VSAM data set, writes global variables to a VSAM data set, or deletes global variables from a VSAM data set. The VSAM data set may be shared among systems, and application code on one system can read and update shared variables written by any system. This function can operate under OPS/REXX or TSO/E REXX. The value returned by this function is the number of global variables read, written, or deleted from VSAM.

CA OPS/MVS global variables are stored in memory, and reading information from or storing information to memory satisfies all OPS/REXX references to the global variables.

The OPSHFI function can be used with only OPS/REXX global variables beginning with a valid global stem prefix (GLOBAL, GLOBALx, or GLVTEMPx). Global stem prefix GLVJOBID is not supported by the OPSHFI function. It is most useful for GLVTEMPx variables because they are not usually backed up to disk. For this function, Automate-format variables are also treated as global. Automate-format variables are defined in the ATMLOCALSCOPEnn and ATMSHAREDSCOPEnn parameters.

When the OPSHFI function is invoked as a function in an AOF rule, for which waits are not allowed, the NOOUTPUT keyword is implied.

Return codes for this function are automatically stored in the OPSRC variable. For an explanation of the OPSHFI return codes, see OPSHFI Command Processor in the chapter “POI Command Processors.”

Note: The OPSHFI function can be used in OPS/REXX, AOF rules, TSO/E REXX, or CLIST.

This function has the following format:

var = OPSHFI(READ|WRITE|DELETE namemask [optional keywords])