You can also use substrings to reference parts of a dynamic status variable.
Example:
If the variable &WORD4 has the value OPEN and the variable &FILE_OPEN has the value 480, then &(FILE_&WORD4)(1:1)=4.
This example uses environmental and dynamic status variables in a rule that sets the clock of a mainframe computer.
During IPL, z/OS issues this message:
IEA888A LOCAL DATE=2000.173,CLOCK=09.35.06 REPLY U, OR GMT/LOCAL TIME
To set the mainframe clock, you can write this rule:
MSGID(IEA888A LOCAL), WHEN(&(TIMESET_&SESSION) EQ YES), OSCMD(R 00, U) MSGID(IEA888A LOCAL), WHEN(&(TIMESET_&SESSION) NE YES), SET(&(TIMESET_&SESSION)=YES), OSCMD(R 00, CLOCK='&TIME(1:2).&TIME(4:5).&TIME(7:8), DATE=&LJULDATE(1:4).&LJULDATE(5:7)')
If the value of the &(TIMESET_&SESSION) status variable is not YES, the rule sets the variable to the current date and time according to the values in the &JULDATE and &TIME environmental variables.
Copyright © 2012 CA. All rights reserved. |
|