User`s guide

Cabletron SPECTRUM Appendix 3: SPECTRUM Specific Tips for Reporting
Using One or More Formula Variables
Formula variables are variables whose values are calculated (from the values of other variables) when you access the data. The
values of the formula variables do not occupy disk space in the PDB.
You can add formula variables to PDB tables by using the IT Service Vision server’s interactive interface or by using the IT
Service Vision %CPDDUTL macro. It is generally preferable to use the %CPDDUTL macro for your production PDB because
the macro documents what you did exactly and enables you to add the variables to many tables easily and accurately.
For information on adding a formula variable using %CPDDUTL, see the Macro Reference documentation for IT Service
Vision.
Note: The appropriate table to add the formula variable to is the table that contains the variables on which the formula variable
is based. In addition to making the Kept status of the formula variable Yes, remember to check that the variables on which the
formula variable is based also have Kept status set to Yes.
Adding a Formula Variable By Using the Interactive Interface
The formula variables UDAY and UWEEK can be useful when reporting on data in your PDB. To create them if they do not
already exist:
1.
Follow this path from the main menu:
Administration -> Manage Tables ->select the table -> click right mouse button -> Properties ->
General -> Variables
2. For one formula variable, for instance UWEEK, select Tools and Create Formula. IT Service Vision displays the
Create New Formula window. Type in the variable name UWEEK and select OK. IT Service Vision displays the
Make/Edit Formula window. Select General.
3. Select the levels at which you want the formula calculated. In this case, select Detail, Day, Week, Month, and Year
in the Apply to level field.
Note: If you choose to define a formula variable for multiple levels, you must be sure that any variables on which it is
based have a Kept status of
Yes
and any statistics on which it is based are selected at those levels and their base
variables have a Kept status of Yes.
4. Specify the length. In this case, type over the 8 with a 6 in the Length field.
5. Select the data type. In this case, select Numeric in the Type field.
6. Select the Kept status. In this case, select Yes in the Kept in PDB field.
7. Specify the label. In this case, type Week in the Label field.
8. Specify the description. In this case, in the Description field type The Sunday immediately
previous to the date in DATETIME.
9. Select Formula Source. If you have questions about what constitutes a valid formula, select Help. You are presented
with a largely blank window with numbers on the left side. Type in the formula to calculate values for the formula
variable; in this case define UWEEK as follows:
UWEEK = datepart(datetime) - weekday(datepart(datetime)) + 1;
and then select Check Code. The results of the check display in the message area at the bottom of the SAS window.