Previous Topic: 5.2 Using CA MICS FilesNext Topic: 5.2.2 A Single File and Multiple Cycles


5.2.1 A Single File and a Single Cycle


In this scenario, you input observations from the CA MICS
cycle and produce a SAS data set containing a subset of the
input observations. This means it may contain only some of
the data elements from the input cycle. For example, you may
only select records with yesterday's date or records from a
particular system.  You may also add variables (computed from
those in the input cycle) to the new SAS data set.

The sort order of the input file must be appropriate for the
creation of the new SAS data set, and the sort order of the
new file must be appropriate for the output report.

This is a sample program:

DATA NEWFILE;
KEEP JOBEXCPS JOBCPUTM RATIO;
SET &PJOBX..BATJOB01;
IF ZONE='1';
RATIO=JOBEXCPS/JOBCPUTM;
PROC SORT; BY RATIO;
PROC PRINT;

Only observations from prime time (ZONE='1') are included in
the data set (NEWFILE) being created. Only the variables
JOBEXCPS and JOBCPUTM from BATJOB01 plus the one being
computed (RATIO) are included.  The creation of NEWFILE does
not require a sorted file, but printing the output in order
of RATIO does.