Previous Topic: 5.3.2.3 HSMVOL Usage ConsiderationsNext Topic: 5.3.3 Tape Planning File (HSMTAP)


5.3.2.4 HSMVOL Retrieval Examples



In the examples, a SAS macro variable is used to specify the
DDname part of the CA MICS file name. These macro variables
are a standard part of CA MICS and are available for all
files. The macro variable name has the form &diiit, where d
is the database identifier, iii is the information area
name, and t is the timespan.  For the examples, a database
identifier of P is used.  The identifier is installation
dependent, so you should find out what the identifiers are at
your installation.

1.  Show all observations for VOLSERs LRG004 and LGR005 in
    the DETAIL time-span to illustrate the special
    granularity shown in the figure above.

  DATA WORK.VOLUMES;
  SET &PHSMX..HSMVOL01;
  IF VOLSER = 'LRG004' OR VOLSER = 'LRG005';
  RUN;
  PROC SORT DATA=WORK.VOLUMES; BY VOLSER VOLCOLDT;
  PROC PRINT       DATA=WORK.VOLUMES;
   TITLE 'DETAIL TIME SPAN VIEW OF HSMVOL FILE';
   BY VOLSER VOLCOLDT;
   SUM VOLVOLNO
       VOLAVXED VOLAVLOW VOLAVHI  VOLAVAFT
       VOLAVBEF VOLAVEED;
   VAR VOLSER   VOLCOLDT
       HSMLEVEL
       VOLCAPMB
       VOLAVXED VOLAVLOW VOLAVHI  VOLAVAFT
       VOLAVBEF VOLAVEED;
   SUMBY VOLSER;
  RUN;
  DATA WORK.VOLUME;
  SET &PHSMD..HSMVOL01;
  IF VOLSER = 'LRG004' OR VOLSER = 'LRG005';
  RUN;
  PROC SORT DATA=WORK.VOLUME; BY VOLSER;
  PROC PRINT       DATA=WORK.VOLUME;
   TITLE 'DAYS TIME SPAN VIEW OF HSMVOL FILE';
   BY VOLSER;
   SUM VOLVOLNO
       VOLAVXED VOLAVLOW VOLAVHI  VOLAVAFT
       VOLAVBEF VOLAVEED;
   VAR VOLSER
       HSMLEVEL
       VOLCAPMB
       VOLAVXED VOLAVLOW VOLAVHI  VOLAVAFT
       VOLAVBEF VOLAVEED;
   SUMBY VOLSER;
  RUN;

2.  Display the average daily occupancy rate before and after
    daily space management during the current month for all
    volumes beginning with 'TSM'.

    DATA;
    SET &PHSMM..HSMVOL00;
    IF VOLSER=:'TSM';
    PROC PRINT; VAR VOLSER VOLAVBEF VOLAVAFT;


3.  Storage group is not provided by data collector for the
    HSMVOL file.  Combine the data from the VCAVOA file
    (DETAIL time-span) with the HSMVOL file (DAYS time-span)
    for yesterday and print various key totals and averages
    by STORNAME (storage group).  Both files are in the P
    unit data base.

     PROC SORT DATA=&PVCAX..VCAVOA01
               OUT=WORK.PRIMARY;
      BY VOLSER;
     PROC SORT DATA=&PHSMD..HSMVOL01
               OUT=WORK.HSM;
      BY VOLSER;
     DATA WORK.VOLUMES;
     MERGE WORK.PRIMARY
           WORK.HSM;
     BY VOLSER;
     VOAALLMB = (VOASPACA*VOATKCAP)/1000000;
     RUN;
     PROC SORT DATA=WORK.VOLUMES; BY STORNAME VOLSER;
     PROC PRINT LABEL DATA=WORK.VOLUMES;
      BY STORNAME;
      SUM VOACAPMB VOAALLMB VOLCAPMB;
      VAR VOLSER
          HSMLEVEL
          VOACAPMB VOAALLMB
          VOLAVXED VOLAVLOW VOLAVHI  VOLAVAFT
          VOLAVBEF VOLAVEED;
      SUMBY STORNAME;
     RUN;