5. FILES › 5.2 Batch Information Area Files › 5.2.5 System Task Program Activity File (BAT_ST) › 5.2.5.4 BAT_ST Retrieval Examples
5.2.5.4 BAT_ST Retrieval Examples
This section presents typical BAT_ST retrieval examples.
1. Print all executions of operator task 'MOUNT'.
DATA;
SET &pBATX..BAT_ST01;
IF PROGRAM='MOUNT';
PROC PRINT; VAR SYSID JOB STARTTS ENDTS;
2. Print out the resource consumption of the programs
executed with system task 'IMS' and display the measures
for each interval accounting record.
DATA;
SET &pBATX..BAT_ST01;
IF JOB=:'IMS';
PROC PRINT; VAR SYSID JOB PROGRAM PGMINTVL STARTTS
ENDTS PGMSERVU PGMCPUTM PGMEXCPS;
3. Print total resource consumption by systems task over the
last two months.
%LET BY = PROGRAM ;
%LET BREAK = PROGRAM ;
DATA FILE1;
SET &pBATM..BAT_ST01
&pBATM..BAT_ST02;
PROC SORT DATA=FILE1; BY &BY;
DATA FILE1;
SET FILE1;
%PGMSUM;
PROC SORT DATA=FILE1; BY DESCENDING PGMSERVU;
PROC PRINT; VAR SYSID ACCTNO1 PGMSERVU PGMCOUNT;