5. FILES › 5.2 Batch Information Area Files › 5.2.11 Measured Usage Global File (BATMUG) › 5.2.11.4 BATMUG Retrieval Examples
5.2.11.4 BATMUG Retrieval Examples
This section presents typical BATMUG retrieval examples.
1. Print the CPU time consumed by product 'IMS/ESA' from
the most current DETAIL time-span cycle, by SYSID.
DATA;
SET &pBATX..BATMUG01;
IF MUPROD='IMS/ESA' ;
PROC SORT ;
BY SYSID STARTTS ;
PROC PRINT;
BY SYSID STARTTS ;
VAR SYSID MUPROD MUGSRBTM MUGTCBTM MUGCPUTM ;
SUM MUGSRBTM MUGTCBTM MUGCPUTM ;
2. Report CPU service units by product SYSID and hour for
all products in the current DAYS time-span cycle.
DATA;
SET &pBATD..BATMUG01;
/* Convert CPU time to service units using factors */
/* displayed in IBM's IFAURP report program output */
SELECT SYSID ;
WHEN('CPU1') DO ;
FACTOR=xxx.xx ; /* From IFAURP report listing */
CPUSU=FACTOR*MUGCPUTM ;
END ;
WHEN('CPU2') DO ;
FACTOR=yyy.yy ; /* from IFAURP report listing */
CPUSU=FACTOR*MUGCPUTM ;
END ;
OTHERWISE DO ;
PUT 'SYSID ENCOUNTERED WITH NO SELECT/WHEN' ;
PUT SYSPLEX= SYSID= CPUSERAL= MUPROD= ;
END ;
END ;
PROC SORT ;
BY MUPROD HOUR SYSID ;
PROC PRINT;
BY MUPROD HOUR ;
VAR SYSID MUPROD MUGCPUTM CPUSU FACTOR ;
SUM MUGCPUTM CPUSU ;
Note: a more efficient method to convert CPU time to
service units is to construct a SAS FORMAT that
returns the conversion factor for each SYSID.