Previous Topic: 5.5.2 Data Element List

Next Topic: 5.6 DB2 System Activity Suspend (DB2_DS) File

5.5.3 Usage Considerations


This section identifies any special considerations or
techniques related to using the DB2DSP file.  Additionally,
several retrieval examples are provided to facilitate the use
of this file.

The examples use a SAS macro to specify the DD name part of
the CA MICS file name. These macros are a standard part of CA
MICS and are available for all files. The macro name has the
form _iiit, where "iii" is the information area name and "t"
is the timespan.  In addition, many of the examples use the
_fffSUM macro, where "fff" is the file identifier, to
summarize the data as indicated by the _BY and _BREAK macro
definitions.

Special Considerations/Techniques

 1.  Be careful when using the special date and time data
     elements contained in each CA MICS file. As the file's
     granularity increases in higher timespans, certain
     fields loose significance and should not be referenced.

     o HOUR should not be used in MONTHS and YEARS.
     o DAY and DAYNAME should not be used in WEEKS, MONTHS,
       or YEARS.
     o WEEK should not be used in MONTHS or YEARS.
     o MONTH should not be used in YEARS.

 2.  The data elements STARTTS and ENDTS have different
     meanings when used in the DETAIL timespan versus their
     meaning in the DAYS, WEEKS, MONTHS, and YEARS timespans.
     The ENDTS and STARTTS, when appearing in the DAYS,
     WEEKS, MONTHS, and YEARS timespans, indicate the span of
     time over which the data has been summarized.  STARTTS
     indicates the lowest date and time, and ENDTS indicates
     the greatest date and time for the summarized data.

Retrieval Examples

 1.  List all PLANs used yesterday and give the user ID that
     invoked it.

     DATA TEST1;
     SET _DB2D.DB2DSP01
         ;
     YESTRDY=DATE()-1;
     IF DATEPART(ENDTS)=YESTRDY;
     MACRO _BY DSPPLAN DB2AUTH %
     MACRO _BREAK DB2AUTH %
     PROC SORT DATA=TEST1 OUT=TEST1; BY _BY;
     DATA TEST1;
     SET TEST1;
     _DSPSUM;
     PROC PRINT DATA=TEST1; BY DSPPLAN;
     VAR PLNAUTH;
     TITLE YESTERDAYS USERS BY DB2 PLAN;

 2.  Print the TCB time for each plan used last month.

     DATA TEST2;
     SET _DB2M.DB2DSP01;
     IF DSPTCBTM>0 ;
     MACRO _BY DSPPLAN %
     MACRO _BREAK DSPPLAN %
     PROC SORT DATA=TEST2 OUT=TEST2; BY _BY;
     DATA TEST2;
     SET TEST2;
     _DSPSUM;
     PROC PRINT DATA=TEST2;
     VAR PLNPLAN DSPTCBTM ;
     TITLE TCB TIME BY PLAN;