The OPSARM function allows requests for z/OS automatic restart management (ARM) services to be issued from AOF rules on behalf of the current address space. In addition, OPSARM allows any batch job or started task to request ARM for itself based on its own message traffic instead of internally coded calls to ARM.
Important! If you use OPSARM to issue ARM service requests using message rules, the message must originate from the address space that is the target of the ARM request. The only exception to this are requests for ARM abstract elements. You can issue these from any address space and they are identified using the TOKEN parameter. You should not use messages that originate from system address spaces such as MASTER, CONSOLE, or JESx to issue ARM requests.
Note: The meaning and use of the ARM requests are explained in further detail in the ARM section of IBM documentation.
This function has the following format:
var = OPSARM (function, elemname,{elemtype},
{termtype},{timeout},{starttext},{eventexit}{token})
Example: OPSARM
In the following example, batch job PAYROLL1 is placed under ARM restart control, for restart only, on the current system. No predecessor elements are defined in the policy.
)MSG $HASP373
)INIT
armjob ='PAYROLL1'
)PROC
If msg.jobname = armjob Then Do
arc = Opsarm('REGISTER',armjob,,'ELEMTERM')
If arc < 8 Then Do
arc = Opsarm('READY')
Say armjob "HAS REGISTERED WITH ARM"
End
Else
Say "ARM REGISTRATION OF" armjob "FAILED RC="arc, "REASON="opsrecd
End
Return 'NORMAL'
)END
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |