Setting and using variables
You can use OMEGAMON® for IMS predefined variables and your own variables in your OMEGAMON for IMS screen spaces.
By using variables, you can exploit the powers of various other OMEGAMON for IMS features. For example:
- Build generic screen spaces that pick up values and analyze any number of like items, such as devices. The OMEGAMON for IMS zooming feature uses this capability.
- Set up conditional branches to other screen spaces (using
.FGO
) based on relationships of variable values. - Pick up values in screen spaces designed for OMEGAMON for IMS automating and logging features: exception logging facility (XLF), automatic screen facility (ASF), and timed screen facility (TSF).
You can use variables in several ways.
- You can define your own variables using the
.VAR
immediate command. For example:.VAR SET &NXTSCRN MONITOR .VAR SET &DEVICE 123
- You can use
.VAR
with relational operators to set a variable equal to a value under the condition specified. For example, you can specify that a variable is resolved only if a device address is greater than 150. - You can use variables that are internally defined by OMEGAMON for IMS at initialization. They are:
- &ZFRSTSS - first screen space name
- Zoom command variables (see /ZOOM in the IBM® OMEGAMON for IMS on z/OS®: Realtime Commands Reference)
- Exception variables (cccc is the exception
name):
- &ZXccccT
- Threshold value
- &ZXccccV
- Last trip value
- &ZXccccW
- Worst trip valu
- You can use the following keywords for conditional setting of
variables. Their values are initialized by OMEGAMON for IMS.
- CPSER
- The CPU serial number.
- DIR
- The ID assigned to the director in cross system mode.
- MODE
- The mode of operation for OMEGAMON for IMS.
- OPSYS
- The operating system level.
- PREFIX
- The OMEGAMON for IMS product code.
- IMSID
- The system ID from the
SYS=
startup parameter. - UNIT
- The device number from the
UNIT=
startup parameter. - USER
- The profile suffix from the
USER=
startup parameter. - &var
- A variable. Allows you to set any comparison you want.
For example, to pass values to screen spaces with
.SGO
,
enter the following commands: .VAR SET &NXTSCRN MONITOR
.VAR SET &DEVICE 123
This sets values for NXTSCRN and DEVICE. You can now use those
variables in a screen space:
DEV &DEVICE
DIO
.SGO &NXTSCRN
OMEGAMON for IMS interprets the screen
space entries as if you entered the following:
DEV 123
DIO
.SGO MONITOR
You can also set variables conditionally. In the following example,
the variable SYSTEM is set to A if the variable SWITCH is
set to YES; SYSTEM is set to B if SWITCH is
set to NO; and SYSTEM is set to C if SWITCH is
set to MAYBE.
C.VAR SET &SYSTEM A &SWITCH=YES
C.VAR SET &SYSTEM B &SWITCH=NO
C.VAR SET &SYSTEM C &SWITCH=MAYBE
In the following example, the variable TOKEN is
set to IMS only
if the product prefix is OI:
C.VAR SET &TOKEN IMS PREFIX=OI