User`s guide
OpenView and NetView Appendix 3: OVW-Specific Tips for Reporting
Subsetting by Using a Format in Local or Global Where
If you have too many values of interest to fit in a WHERE expression or if a variable needs some sort of transformation (for
example, a table lookup) before you can construct a WHERE expression, you may want to use a user-written format.
In a simple WHERE expression (see Subsetting by a Simple Local Query Expression
in Open Systems Appendix 2: Tips for
Reports or see Subsetting by a Simple Global Query Expression
in Open Systems Appendix 2: Tips for Reports), you may want
to construct an expression using the contains operator. For instance,
variable-name
? ’
value
’
where
?
means
contains
. You can use the contains operator only if variable-name is of IT Service Vision interpretation type
STRING
.
However, with a format some IT Service Vision numeric variables can be transformed into more meaningful string values, and
you can subset based on the transformed values.
For example, you can subset on the machines that provide a specific service, such as IP gateway service. In HP-OV table
HN2NIX, the service is described in the SYSSERV variable. Because the SYSSERV variable is numeric, you cannot use a
WHERE expression like this:
SYSSERV ? ’IPGATEWAY’
However, if you convert the value of the SYSSERV variable to a string by using the SYSSERV format supplied in IT Service
Vision, you can test on the converted value of SYSSERV. In that case, you can use a WHERE expression like this:
put(sysserv,sysserv.) ? ’IPGATEWAY’
where the put function causes the original value of the SYSSERV variable to be replaced by the value produced by the
application of the SYSSERV format.
Finding an IT Service Vision Supplied Format
To find the IT Service Vision supplied format, if any, for converting a numeric metric to a character string, follow this path from
the IT Service Vision main window:
Administration -> Manage Tables ->
select your table -> click right mouse button ->
Properties -> Variables ->
select your variable -> click right mouse button-> Properties -> Advanced
where the variable is the variable for which you want to find a format and the table is the table in which that variable resides.
The Format field displays the supplied format, if any.
Creating a User-Written Format
Explanations that are associated with supplied report definitions sometimes refer you to IT Service Vision supplied example
programs for building user-written formats. You can submit the example programs as-is in the PROGRAM EDITOR window, or
modify them, or write format-generating programs from scratch.
The csgfmt2 example program is an example of a user-written format that provides the same capability of testing for a string,
but the user format is based on the value of MACHINE rather than SYSSERV (and thus can be used on tables that do not
contain the SYSSERV variable). The csgfmt2 program generates a format named $USVCS, which translates the MACHINE
value to a string. This must be a user-written format because it uses the values of MACHINE at your site as read from your
DETAIL.HN2NIX view.