Previous Topic: 5.8.2 Data Element List

Next Topic: 5.9 DB2 User DDF Activity (DB2DDU) File

5.8.3 Usage Considerations


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

In the examples, we 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 time-span.  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 variables.

Special Considerations/Techniques

 1.  Care must be exercised in using the special date and
     time data elements contained in each CA MICS file. As
     the file's granularity increases in higher time-spans,
     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 time-span versus their
     meaning in the DAYS, WEEKS, MONTHS, and YEARS
     time-spans.  The ENDTS and STARTTS, when appearing in
     the DAYS, WEEKS, MONTHS, and YEARS time-spans, indicate
     the span of time over which the data has been summarized
     with STARTTS indicating the lowest date and time and
     ENDTS indicating the greatest date and time for the
     summarized data.

Retrieval Examples

 1.  List DDF activity for yesterday by DB2 subsystem id.

     DATA TEST1;
     SET &DB2D.DB2DDY01
         ;
     YESTRDY=DATE()-1;
     IF DATEPART(ENDTS)=YESTRDY;
     RUN;

     %LET BY = SYSID DB2ID;
     %LET BREAK = DB2ID ;
     PROC SORT DATA=TEST1 OUT=TEST1; BY &BY; RUN;

     DATA TEST1;
     SET TEST1;
     %DDYSUM;

     PROC PRINT DATA=TEST1; BY DB2ID;
     VAR DB2 ID DDYBYTS DDYBYTR DDYCNVS DDYCNVR;
     TITLE YESTERDAYS DDF ACTIVITY BY DB2 SUBSYSTEM ID; RUN;

 2.  Print the maximum bytes transmitted for any DB2 system
     processing a DDF request for last month.

     DATA TEST2;
     SET &DB2M.DB2DDY01;
     IF DDYMBYTS>0 OR DDYMBYTR>0;

     %LET BY = SYSID DB2ID;
     %LET BREAK =  DB2ID;

     PROC SORT DATA=TEST2 OUT=TEST2; BY _BY;

     DATA TEST2;
     SET TEST2;
     %DDYSUM;

     PROC PRINT DATA=TEST2;
     VAR DB2ID DDYMBYTS DDYMBYTR;
     TITLE MAXIMUM BYTES SENT/RECEIVED BY DB2 DDF SUBSYSTEM;