

4. FILES › 5.1 TLM Component Files › 5.1.2 TMC Information Area Files › 5.1.2.1 Tape Data Set File (TMCTMD) › 5.1.2.1.4 TMCTMD Retrieval Examples
5.1.2.1.4 TMCTMD 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. Using the most current DETAIL timespan TMCTMD file, list
all tape data sets created in the last 30 days with a
high level data set name qualifier of 'CMPR'. Display
the data set name, volser, creation date, space used,
and the job name, job step, and JCL DDNAME used to
create the data set.
DATA;
SET &PTMCX..TMCTMD01;
IF DSNAME=:'CMPR';
CDATE=DATEPART(TMDCREAT) ;
IF CDATE > DATEPART(ENDTS) - 30;
FORMAT CDATE DATE8. ;
* ;
PROC PRINT LABEL ;
VAR DSNAME VOLSER CDATE TMDDSSZM TMDCJOB TMDCSTEP TMDCDDN ;
FORMAT CDATE DATE8. ;
TITLE1 'CMPR* Data Sets Created in Last Month' ;
2. When CA 1 is the the input data source, the data element
VOLCNT is always zero. The code below will compute
VOLCNT for reporting purposes.
PROC SQL;
CREATE VIEW WORK.TEMP1 AS
SELECT *
FROM &TMCX..TMCTMD01
ORDER BY MVMDSID DESC, TLMLSET DESC, TMDDSNSQ DESC ;
QUIT;
DATA TEMP2 / VIEW=TEMP2 ; SET TEMP1;
RETAIN XCNT ;
LENGTH XSEQ 2 XBASE $6 ;
XSEQ = INPUT(SUBSTR(MVMDSID,9,2),PIB2.);
XBASE = INPUT(SUBSTR(MVMDSID,1,6),$CHAR6.);
IF TLMFSET AND TLMLSET THEN DO;
VOLCNT = 1;
END;
ELSE DO;
IF TLMLSET THEN DO;
XCNT = XSEQ;
VOLCNT = XCNT;
END;
IF (TLMFSET = 0 AND TLMLSET = 0) OR TLMFSET THEN DO;
VOLCNT = XCNT;
END;
END;
RUN;
/* user report code using VOLCNT would follow */
/* using work.temp2 as the input */
Copyright © 2014 CA.
All rights reserved.
 
|
|