Built-in functions are an integral part of OPS/REXX that give AOF rules access to a wide variety of system data that is needed to make programmatic actions. In some cases, certain OPS/REXX functions can perform specific system tasks. OPS/REXX functions can retrieve system information, such as job status, device status, or JES2-related resource data, and perform such tasks as low lighting messages or invoking z/OS Automatic Restart Management Services.
You can use the following OPS/REXX built-in functions in AOF rules:
Performs z/OS Automatic Restart Management Services.
Determines whether a single job or element name is registered with ARM.
Issues commands to the CA 7 scheduling product.
Creates an SNMP trap.
Empties the contents of the External Data Queue (stack)
Changes the color of OPSLOG (or console) messages.
Obtains z/OS Command Prefix Facility information.
Obtains device information.
Deletes highlighted operator messages.
Returns security package related information.
Reads or writes variables to shared VSAM file.
Returns various system and CA OPS/MVS information.
Obtains various IPL parameter library information.
Obtains JES2 related resource data.
Retrieves OPSLOG data.
Generates a warm- or cold-start SNMP trap.
Controls CA OPS/MVS parameters.
Sends messages to OPSLOG or other copies of CA OPS/MVS.
Creates SMF records.
Collects System Resource Manager (SRM) data.
Obtains active ASID, WTOR, IMS, or WLM information.
Builds and submit batch jobs.
Obtains z/OS system symbol information.
Manipulates variables.
For complete descriptions and coding guidelines for each OPS/REXX built-in function, as well as a list of valid rule types in which each can execute, see the Command and Function Reference.
Example: AOF Rule Using Built-in Functions
The following AOF rule uses OPS/REXX host environments and built-in functions:
)TOD 02:00
)INIT
/* This rule should only be active on SYSA. Use the OPSINFO */
/* built-in function to get the SMFID of this system to see */
/* if the rule should be enabled or not. */
if OPSINFO('SMFID') <> 'SYSA' then
return 'REJECT'
)PROC
/******************************************************************/
/* Rule purpose : Set up Z initiators for batch window */
/* TOD rule spec fires every 2:00 AM */
/******************************************************************/
/* Issue info message using ADDRESS WTO OPS/REXX */
/* Host Environment to let everybody know of change. */
msgtxt= 'Initiators configured to handle 2:00 Batch Flow'
ADDRESS WTO
"MSGID(OPSAUTO1) TEXT(' "msgtxt" ') ROUTE(2)"
/* Let's start all drained 'Z' initiators. We'll obtain this info */
/* by using one of the options on the OPSJES2 built-in function. */
/* Then we'll use the ADDRESS OPER OPS/REXX host */
/* environment to issue a command to JES. */
ZINITS=OPSJES2('I','INIT','Z','D')
do ZINITS /* Loop for all drained Z' inits */
pull RECORD /* Obtain data from the EDQ */
INITID=WORD(RECORD,1) /* First word is init id */
address OPER /* Switch to ADDRESS OPER */
"C($SI"INITID") NOO" /* Issue JES2 $Six command */
end /* End of DO */
|
Copyright © 2011 CA.
All rights reserved.
|
|