Previous Topic: 5.5.1.3 HFSDIR Usage ConsiderationsNext Topic: 6. DATA SOURCES


5.5.1.4 HFSDIR 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.  List all scanned file systems created in the last 30 days
    with a high level data set name qualifier of 'CMPR'.

 DATA;
 SET &PHFSX..HFSDIR01;
 IF DSNAME=:'CMPR';
 IF DATEPART(CREATETS) > DATEPART(ENDTS) - 30;
 PROC PRINT; VAR DSNAME VOLSER CREATEDT DAASPACA DAASPACU;

2.  Show all scanned file systems that reside on
    VOLSER=OMVS01 and the total megabytes they occupy.
    Report the largest data sets first.

 DATA ONE;
      SET &PHFSX..HFSDIR01;
      IF VOLSER='OMVS01';
 PROC SORT;
      BY DESCENDING DAAALLSP;
 PROC PRINT NOOBS UNIFORM N;
      VAR DSNAME DEVTYPE VOLSER CREATETS
          DAAREFTS DAAALLSP;
      SUM DAAALLSP;
 RUN;