Address space-related variables are compound symbols that begin with a reserved stem of GLVJOBID. They let you share data between different AOF rules for events that originate from the same address space. This lets you save data generated during one event created by a job, and then use that data in another event created by the same job.
For example, consider the following two AOF rules:
)MSG $HASP375 )PROC /*****************************************************************/ /* Rule Purpose : Set a local variable to keep track of the most */ /* current # of lines exceeded during run time */ /* This variable will be checked when the job */ /* ending event occurs. */ /* $HASP375 jobname ESTIMATE EXCEEDED BY # LINES */ /*****************************************************************/ if WORD(MSG.TEXT,5) < > 'BY' then return GLVJOBID.EXCEEDED = WORD(MSG.TEXT,6) /* # of lines */
)EOJ *
)PROC
/*****************************************************************/
/* Rule Purpose : Check to see if the batch job that just ended */
/* exceeded any output lines during its run time */
/* by testing to see if the GLVJOBID variable */
/* that would have been set in the $HASP375 */
/* rule exists. Log info if variable is present. */
/* EOJ fires automatically when job terminates. */
/*****************************************************************/
if OPSVALUE('GLVJOBID.EXCEEDED','E') = 'N' then
return
JOB = EOJ.JOBNAME
NUMLINES = GLVJOBID.EXCEEDED
MSG = 'OPSAUTO1 BATCH JOB ' JOB' LAST EXCEED ='NUMLINES
LOGIT = OPSSEND('*','B',MSG)
Suppose that JOB1 and JOB2 start on the system at the same time. JOB1 begins to exceed expected output lines and the JOB1 address space produces a $HASP375 message. This event executes Rule #1, which sets a unique GLVJOBID.EXCEEDED variable for JOB1 only. Both JOB1 and JOB2 end at the same time, thus executing Rule #2.
While Rule #2 is processing the end-of-job event caused by JOB1 ending, the local variable GLVJOBID exists, and the rule produces the informational message in the OPSLOG that includes the value of the GLVJOBID.EXCEEDED address space-related variable that was set in Rule #1. While Rule #2 is processing the end-of-job event caused by JOB2, the local variable GLVJOBID.EXCEEDED does not exist, so no further processing is done in the rule.
Review the following additional facts about address space-related variables:
|
Copyright © 2011 CA.
All rights reserved.
|
|