

Common Techniques Used In Reporting › 5.3 Combining CA MICS Files › 5.3.1 Using Multiple Cycles from a Single File
5.3.1 Using Multiple Cycles from a Single File
In these scenarios, assume that the variables in each of the
data sets are the same in terms of order and even number
(although each cycle may have a different number of
observations).
The main reason to combine cycles into a single data set is
that you are interested in an analysis that spans more time
than is covered in a single cycle. For example, if you are
interested in three months, you will want to combine three
cycles of the appropriate CA MICS file from the MONTHS
timespan.
If you are interested in something that occurred on a certain
date, you will normally want to process several cycles from
the DAYS or DETAIL timespan. The reason for this is that a
daily processing of SMF data may include more than a single
day's data. For example, assume that Monday's SMF data is
dumped at 2AM on Tuesday, and Tuesday's data is dumped at 1AM
on Wednesday. Therefore, if Tuesday's activity is critical
to your analysis, you must use both Monday's cycle and
Tuesday's cycle to ensure that you have all the data for
Tuesday. You can even add Wednesday's data to be sure.
Assume today is Monday and you are interested in last
Wednesday's data from the DAYS timespan for the BAT User
Activity File (BATJOB). If processing has been proper and on
schedule, cycle 01 should be Sunday, 02 Saturday, 03 Friday,
04 Thursday, and 05 Wednesday. To be sure you get all of
Wednesday's activity, you should process cycles 4, 5, and 6:
DATA file-name;
SET &PBATD..BATJOB04 &PBATD..BATJOB05 &PBATD..BATJOB06;
BY SYSID;
IF MONTH=12 AND DAY=21;
This program will output and interleave observations from the
three cycles by SYSID only for those observations with the
values of MONTH and DAY, as specified in the subsetting IF
statement. The resulting SAS file will be in the same order
as the cycles used.
You could use additional IF statements to make selections
based on additional variables. For example, if you wanted to
include only observations whose processing charges were
greater than $15.00, you could use the JOBCOST variable
described in the Files chapter of the Batch and Operations
Analyzer Guide:
DATA file-name;
SET &PBATD..BATJOB04 &PBATD..BATJOB05 &PBATD..BATJOB06;
BY SYSID;
IF MONTH = 12;
IF DAY = 21;
IF JOBCOST > 15.00;
Copyright © 2014 CA.
All rights reserved.
 
|
|