Reporting on DCOLLECT Data | |
Follow this path from the main menu:
Reports -> Supplied Reports
IT Service Vision displays the supplied report definitions that are based on the tables in your PDB. To see the supplied report definitions for DCOLLECT data, follow this path from the list of supplied report definitions:
Edit -> Sort -> Table
IT Service Vision displays the list sorted by table name. Scroll to the report definitions whose table names begin with the characters 'XDC'. (The table names begin 'XDC' and the corresponding supplied report definitions begin 'DC'.) See Shared Appendix 7: Supplied Report Naming Convention and MVS Appendix 1: Tables and Variables Naming Convention for more information.
Report definitions that are based on groups and provide summaries of disk usage or of dataset space require additional setup before they can be used to generate reports. (These report definitions are listed later in this section.) The setup must be done at your site because the setup involves grouping volumes and datasets appropriately for your site.
You must provide formula variables to define these groups based on the disk and dataset naming conventions at your site. Formula variables are variables whose values are calculated (from the values of other variables and from constants) when you access the data. Formula variables do not occupy disk space in the PDB. The following examples show you various automated and "manual" methods that you can use to define the formula variables.
You may want to include the code that defines the formula variables (including the creation of a format, when applicable) at the beginning of the daily job production job so that the values of the formula variables are always current. Check the "manual" definitions of formula variables periodically and update them as necessary to keep them current.
Note: Some of these techniques make use of the search path for formats. In IT Service Vision on the server host, the default search path for formats is
DICTLIB.CPFMTS -> SITELIB.CPFMTS -> PGMLIB.CPFMTS -> WORK.FORMATS -> LIBRARY.FORMATS ->
The supplied reports named DCSPPIES, DCSPUSES, DCSPCAUS, and DCALSPCS use table XDCVOLS and assume that XDCVOLS has a grouping variable named XUSEGRP. The supplied report named DCELGMGS runs on table XDCCAPD and assumes that XDCCAPD has a grouping variable named XUSEGRP. Because XUSEGRP is based on the disk volumes at your site, it is not a supplied variable. You need to define XUSEGRP for both tables before running these reports. This section will walk you through the steps to define it.
It is typical to define XUSEGRP as a formula variable. After you have the XUSEGRP formula variable defined in these tables, you can also use it in a WHERE expression as applicable. For instance, if you want to report only on system disks, you can use XUSEGRP in a local or global WHERE expression like this:
XUSEGRP = 'SYS'
You can add formula variables to PDB tables using the IT Service Vision %CPDDUTL macro or the IT Service Vision server interactive interface. 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 multiple tables easily and accurately.
To use the %CPDDUTL macro, you must be running IT Service Vision on the server host. Then follow these steps:
Note: For more information about the PROGRAM EDITOR window and about pull-down menus and command lines, see Shared Appendix 2: Navigating SAS Windows.
/* Add formula variable XUSEGRP to table XDCVOLS */ %CPCAT ; CARDS4 ; #1 SET TABLE NAME=XDCVOLS ; DELETE FORMULA NAME=XUSEGRP NOERROR; CREATE FORMULA NAME=XUSEGRP #2 LABEL='VOLUME*USAGE*GROUP' LENGTH=6 TYPE=CHARACTER INTERPRET=STRING SOURCE={ XUSEGRP = SUBSTR(DCVVOLS,1,3); #3 IF XUSEGRP IN('HSM','MIS','APP','TST','SCR') THEN ; ELSE IF XUSEGRP IN('JES','MVS','SYS') THEN XUSEGRP='SYS'; ELSE XUSEGRP='MSC'; } LEVELS='DETAIL DAY WEEK MONTH YEAR' KEPT=YES SUBJECT='' DESCRIPTION='GROUPING VARIABLE FOR DISK VOLUMES' ; BUILD VIEWS NAME=XDCVOLS ; #4 ;;;; #5 %CPCAT(CAT=SASUSER.FORMULAS.XUSEGRP.SOURCE) ; #6 %CPDDUTL(ENTRYNAM=SASUSER.FORMULAS.XUSEGRP.SOURCE,LIST=Y); #7
As another method, you could put the control statements in a flat file or PDS member instead of a source entry. In that case, remove the lines starting from %CPCAT to the line with four semicolons, and change the %CPDDUTL parameter from ENTRYNAM=SAS-catalog-entry-name to FILENAME='filename' and specify the fully qualified name of the flat file.
/* Add XUSEGRP to XDCVOLS */ %CPCAT ; CARDS4 ; SET TABLE NAME=XDCVOLS ; DELETE FORMULA NAME=XUSEGRP NOERROR; CREATE FORMULA NAME=XUSEGRP LABEL='VOLUME*USAGE*GROUP' LENGTH=6 TYPE=CHARACTER INTERPRET=STRING SOURCE={ IF 800X LE DCVDVNU LE 815X THEN XUSEGRP='APP'; #1 ELSE IF 900X LE DCVDVNU LE 907X THEN XUSEGRP='PROD'; ELSE IF 0A00X LE DCVDVNU LE 0A15X THEN XUSEGRP='TEST'; ELSE IF 0601X LE DCVDVNU LE 0605X THEN XUSEGRP='SYSDA'; ELSE XUSEGRP = 'MISC'; } LEVELS='DETAIL DAY WEEK MONTH YEAR' KEPT=YES SUBJECT='' DESCRIPTION='GROUPING VARIABLE FOR DISK VOLUMES' ; BUILD VIEWS NAME=XDCVOLS ; ;;;; %CPCAT(CAT=SASUSER.FORMULAS.XUSEGRP.SOURCE) ; %CPDDUTL(ENTRYNAM=SASUSER.FORMULAS.XUSEGRP.SOURCE,LIST=Y);
Note: Storing the format in SITELIB (in the PROC FORMAT step) requires update access to SITELIB. For update access to SITELIB, use the SITEACC=OLD parameter, in addition to any other %CPSTART parameters, when you invoke IT Service Vision on the server host.
Note: If you want the format to apply only to one PDB, make that PDB the active PDB and then use DICTLIB instead of SITELIB. Storing the format in DICTLIB (in the PROC FORMAT step) requires update access to the PDB. For update access to the PDB, use the DISP=OLD parameter, in addition to any other %CPSTART parameters, when you invoke IT Service Vision server in batch on the server host. Or select WRITE access when you activate the PDB through the interactive interface. (The #n's refer to the notes that follow.)
/* CREATE A FORMAT NAMED $USEGRP AND STORE IT IN SITELIB */ PROC FORMAT LIBRARY=SITELIB.CPFMTS; VALUE $USEGRP 'VOL001','VOL003','VOL005' = 'SYS' #1 'VOL111','VOL112','VOL113' = 'SYS' 'VOL333','PAG888','PAG889' = 'SYS' 'DISK01','DISK99' = 'PROD' 'ATM001','ATM002','ATM003', 'ATM004','CIC002' = 'CICS' OTHER = '****'; RUN; %CPCAT ; CARDS4 ; SET TABLE NAME=XDCVOLS ; DELETE FORMULA NAME=XUSEGRP NOERROR; CREATE FORMULA NAME=XUSEGRP LABEL='VOLUME*USAGE*GROUP' LENGTH=6 TYPE=CHARACTER INTERPRET=STRING SOURCE={ IF DCVVOLS=' ' THEN DCVVOLS=' '; #2 XUSEGRP = PUT(DCVVOLS,$USEGRP.); } LEVELS='DETAIL DAY WEEK MONTH YEAR' KEPT=YES SUBJECT='' DESCRIPTION='GROUPING VARIABLE FOR DISK VOLUMES' ; BUILD VIEWS NAME=XDCVOLS ; ;;;; %CPCAT(CAT=SASUSER.FORMULAS.XUSEGRP1.SOURCE) ; %CPDDUTL(ENTRYNAM=SASUSER.FORMULAS.XUSEGRP1.SOURCE,LIST=Y);
where DCVVOLS is a supplied variable in the XDCVOLS table.
Note: The first assignment statement forces SAS to define DCVVOLS as a character variable. This is necessary only for the syntax check that takes place when the variable is created.
SAVE SASUSER.SAVE.XUSEGRP1.SOURCE
and press ENTER or RETURN.
PDB Data -> Examine PDB Data -> XDCVOLS -> ItemActions -> Browse Data or View Data
Note: You can also browse the data by using other methods. For more information, see MVS Appendix 4: Alternate Data Browsing Method.
COPY SASUSER.SAVE.XUSEGRP1.SOURCE
and press ENTER or RETURN.
SAVE SASUSER.SAVE.XUSEGRP2.SOURCE
and press ENTER or RETURN.
Note: Using the interactive interface, you can edit the formula if you want to construct the values in a different way. For more about the construction of formula variables, follow this path from the main menu:
Help -> Help Index -> formula variable table calc -> ItemActions -> Browse Help
Similarly, you can edit the $USEGRP format if you want to construct the values in a different way. For more about the construction of user-written formats, see Chapter 18, "The Format Procedure" in SAS Procedures Guide, Version 6, Third Edition.
For more information about the %CPDDUTL macro, follow this path from the IT Service Vision main menu:
Help -> Help Index -> CPDDUTL macro dictionary utility -> ItemActions -> Browse Help
Note that the Help Index also has a help entry for each of the CPDDUTL control statements and for the %CPCAT source catalog utility. Also, you can see an example of the use of %CPDDUTL in the Macro Reference documentation for IT Service Vision.
You are likely to want to look at dataset space information based on some kind of grouping, like project. Because the grouping variable would be based on the projects at your site, it is not a supplied variable. You must define it based on your site's reporting needs. This section will walk you through the steps to define a grouping variable named PROJECT.
It is typical to define PROJECT as a formula variable. After you have the PROJECT formula variable defined in the XDCDSET table, you can use it in a WHERE expression when applicable. For instance, if you want to report only on the RPS project, you can specify a simple local or global WHERE expression like this:
PROJECT = 'RPS'
or
PROJECT = 'REDESIGN PRODUCTION SYSTEM'
depending on the way that you set up the PROJECT formula variable.
You can add formula variables to PDB tables using the IT Service Vision %CPDDUTL macro or the IT Service Vision interactive interface on the server host. 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. The %CPDDUTL macro can be run interactively or in batch/background.
For you to use the %CPDDUTL macro interactively, you must be running IT Service Vision on the server host. Then follow these steps:
Note: For more information about the PROGRAM EDITOR window and pull-down menus and command lines, see Shared Appendix 2: Navigating SAS Windows.
/* Add PROJECT to XDCDSET */ %CPCAT ; CARDS4 ; SET TABLE NAME=XDCDSET ; DELETE FORMULA NAME=PROJECT NOERROR; CREATE FORMULA NAME=PROJECT LABEL='Project Group' LENGTH=3 TYPE=CHARACTER INTERPRET=STRING SOURCE={ PROJECT = SUBSTR(DCDDSNA,1,3); } LEVELS='DETAIL DAY WEEK MONTH YEAR' KEPT=YES SUBJECT='' DESCRIPTION='GROUPING VARIABLE FOR DATASETS' ; BUILD VIEWS NAME=XDCDSET ; ;;;; %CPCAT(CAT=SASUSER.FORMULAS.PROJECT.SOURCE) ; %CPDDUTL(ENTRYNAM=SASUSER.FORMULAS.PROJECT.SOURCE,LIST=Y);
where DCDDSNA is a supplied variable in the XDCDSET table. Each value of the DCDDSNA variable is a dataset name.
This example results in values of PROJECT that are three-character project codes.
Note: Storing the format in SITELIB (in the PROC FORMAT step) requires update access to SITELIB. For update access to SITELIB, use the SITELIB= parameter in addition to any other %CPSTART parameters when you invoke IT Service Vision on the server host.
/* CREATE A FORMAT NAMED $CPPROJ AND STORE IT IN SITELIB */ PROC FORMAT LIBRARY=SITELIB.CPFMTS; VALUE $CPPROJ 'IDC' = 'DATA CENTER' 'MKT' = 'MARKETING ANALYSIS' 'HRS' = 'HUMAN RESOURCES SYSTEM' 'RPS' = 'REDESIGN PRODUCTION SYSTEM' ; RUN; /* Add PROJECT to XDCDSET */ %CPCAT ; CARDS4 ; SET TABLE NAME=XDCDSET ; DELETE FORMULA NAME=PROJECT NOERROR; CREATE FORMULA NAME=PROJECT LABEL='Project Group' LENGTH=26 TYPE=CHARACTER INTERPRET=STRING SOURCE={ TEMP = SUBSTR(DCDDSNA,1,3); PROJECT = PUT(TEMP,$CPPROJ.); } LEVELS='DETAIL DAY WEEK MONTH YEAR' KEPT=YES SUBJECT='' DESCRIPTION='GROUPING VARIABLE FOR DATASETS' ; BUILD VIEWS NAME=XDCDSET ; ;;;; %CPCAT(CAT=SASUSER.FORMULAS.XUSEGRP.SOURCE) ; %CPDDUTL(ENTRYNAM=SASUSER.FORMULAS.XUSEGRP.SOURCE,LIST=Y);
where DCDDSNA is a supplied variable in the XDCDSET table. The DCDDSNA variable contains the dataset names.
The value of LENGTH is set to the longest value of PROJECT.
For example, suppose you have a flat file that looks like this:
SYS1 SYSTEM PROD PROD UID123 DEV UID456 TST
and has information on the following variables:
high-level qualifier project code
You could write a SAS program to read the values from the flat file and write them to a SAS data set. Here is a very simple version that reads the records in the flat file shown above and writes the data to a SAS data set named SASDATA.HLQS (you must have previously allocated a SASDATA library):
DATA SASDATA.HLQS; INFILE name-of-your-flat-file ; INPUT @1 HLQ $CHAR8. @10 PROJ $CHAR6. ; RUN ;
You could then run that program in front of the program below.
Note: Storing the format in SITELIB (in the PROC FORMAT step) requires update access to SITELIB. For update access to SITELIB, use the SITEACC=OLD parameter when you invoke IT Service Vision on the server host. (The #n's refer to the notes that follow.)
/* CREATE A SAS DATA SET THAT CONTAINS A FORMAT NAME, HIGH-LEVEL QUALIFIER, AND PROJECT CODE IN EACH OBSERVATION. */ DATA FMTCNTL (KEEP = FMTNAME START LABEL); #1 SET SASDATA.HLQ; RETAIN FMTNAME '$CPPROJ'; START = HLQ; LABEL = PROJ; RUN; /* USE THE FMTCNTL DATA SET TO CREATE THE FORMAT AS SPECIFIED IN THE PREVIOUS DATA STEP */ PROC FORMAT CNTLIN=FMTCNTL LIBRARY=SITELIB.CPFMTS; #2 RUN; /* ADD VARIABLE PROJECT TO TABLE XDCSET USING THE $CPPROJ FORMAT. */ %CPCAT ; CARDS4 ; SET TABLE NAME=XDCDSET ; DELETE FORMULA NAME=PROJECT NOERROR; CREATE FORMULA NAME=PROJECT LABEL='Project Group' LENGTH=6 TYPE=CHARACTER INTERPRET=STRING SOURCE={ HLQ = SCAN(DCDDSNA,1,'.'); #3 PROJECT = PUT(HLQ,$CPPROJ.); IF PROJECT = ' ' THEN PROJECT = HLQ; } LEVELS='DETAIL DAY WEEK MONTH YEAR' KEPT=YES SUBJECT='' DESCRIPTION='GROUPING VARIABLE FOR DATASETS' ; BUILD VIEWS NAME=XDCDSET ; ;;;; #4 %CPCAT(CAT=SASUSER.FORMULAS.XUSEGRP.SOURCE) ; %CPDDUTL(ENTRYNAM=SASUSER.FORMULAS.XUSEGRP.SOURCE,LIST=Y);
where DCDDSNA is a supplied variable in table XDCDSET. The DCDDSNA variable contains dataset names.
$CPPROJ
; START, which is the high-level
qualifier; and LABEL, which is the
project name. $CPPROJ
and stores it in
SITELIB.CPFMTS. $CPPROJ
, to the XDCDSET table, much the
same as previous examples did. LENGTH is
set to the longest value of PROJ. PDB Data -> Examine PDB Data -> XDCDSET -> ItemActions -> Browse Data or View Data
You can use the menu items under the View pull-down menu to view the PROJECT values for each observation. (You can also use other methods to browse the data. For more information, see MVS Appendix 4: Alternate Data Browsing Method.)
Note: If you have write access to the PDB, you can edit the formula if you want to construct the values in a different way. For more information about the construction of formula variables, follow this path from the main menu:
Help -> Help Index -> formula variable table calc -> ItemActions -> Browse Help
Similarly, you can edit the $CPPROJ format if you want to construct the values in a different way. For more information about the construction of user-written formats, see Chapter 18, "The FORMAT Procedure" in SAS Procedures Guide, Version 6, Third Edition.
For more information about the %CPDDUTL macro, follow this path from the IT Service Vision main menu:
Help -> Help Index -> CPDDUTL macro dictionary utility -> ItemActions -> Browse Help
Note that the Help Index also has a help entry for each of the CPDDUTL control statements and for the %CPCAT source catalog utility. Also, you can see an example of the use of %CPDDUTL in the section "Example of %CPDDUTL" in the Macro Reference documentation for IT Service Vision.