Previous Topic: 5.2.6.3 BAT_TP Usage Considerations

Next Topic: 5.2.7 APPC/MVS Transaction File (BATATP)

5.2.6.4 BAT_TP Retrieval Examples


This section presents typical BAT_TP retrieval examples.

1.  Print all APPC/MVS ASCH scheduled TPs that executed
    program 'C011253'.

    DATA;
    SET &pBATX..BAT_TP01;
    IF PROGRAM='C011253';
    PROC PRINT; VAR SYSID PROGRAM STARTTS ENDTS;

2.  Print out the resource consumption of all APPC/MVS ASCH
    scheduled TPs that executed in performance group 5.

    DATA;
    SET &pBATX..BAT_TP01;
    IF PERFGRP=5 ;
    PROC PRINT; VAR SYSID PROGRAM PGMINTVL STARTTS ENDTS
         PGMSERVU PGMCPUTM PGMEXCPS;

3.  Print all APPC/MVS TPs that abended with a system 001 I/O
    error.

    DATA;
    SET &pBATX..BAT_TP01;
    IF PGMSYSAB=1;
    IF TERMCODE=' 001';
    PROC PRINT;
         VAR SYSID PROGRAM STARTTS ENDTS TERMCODE;

4.  Print total resource consumption by program over the last
    two months for APPC/MVS TPs executing in performance
    group 2.

 %LET BY = PROGRAM ;
 %LET BREAK = PROGRAM ;
 DATA FILE1;
 SET &pBATM..BAT_TP01
     &pBATM..BAT_TP02;
 IF PERFGRP=2;
 PROC SORT DATA=FILE1; BY &BY:
 DATA FILE1;
 SET FILE1;
 %_TPSUM;
 PROC SORT DATA=FILE1; BY DESCENDING PGMSERVU;
 PROC PRINT; VAR SYSID PERFGRP JOB PROGRAM PGMSERVU PGMCOUNT;

5.  Daily vs.  Monthly Measurement Analysis

A useful technique for identifying trends and enforcing
standards is to compare a measurement taken in the current
month with similar measurements for the previous month.  The
following SAS examples:  analyzing CPU time, I/O counts, and
service unit counts, illustrate this technique.

CPU TIME ANALYSIS

PGMMXCTM contains the maximum CPU time used by a job step.
At summarization levels higher than DETAIL, PGMMXCTM provides
a "worst case" standard against which all executions of this
program can be measured.  For example, the following SAS code
locates and reports on all of the previous day's job steps
that used more CPU time than the longest run of the same
program the previous month.

* Get the previous month's figures;
PROC SORT
DATA = MONTHS.BAT_TP01 (KEEP = PROGRAM PGMMXCTM)
OUT = MONTH;
BY PROGRAM;
* Get the previous day's figures;
PROC SORT
DATA = DETAIL.BAT_TP01
(KEEP = PROGRAM PGMCPUTM JOB RDRTS)
OUT = YSTRDY;
BY PROGRAM JOB RDRTS;
DATA;
MERGE MONTH (IN = INMONTH)
YSTRDY (IN = INYSTRDY);
BY PROGRAM;
* Only compare CPU time for TPs run the previous month ;
IF INMONTH ;
IF PGMCPUTM > PGMMXCTM;
*                                                      ;
PROC PRINT ;
LABEL PGMMXCTM = "Prior Max CPU Time";
VAR PROGRAM PGMMXCTM JOB RDRTS PGMCPUTM;
TITLE "Program Runs Exceeding Last Month's CPU Max";

I/O COUNT ANALYSIS

PGMMXTIO contains the maximum total EXCP count issued by a
job step.  At summarization levels higher than DETAIL,
PGMMXTIO provides a "worst case" standard against which all
executions of this program can be measured.  For instance,
the following SAS code locates and reports on all of the
previous day's job steps that did more I/O than the heaviest
run of the same program the previous month.

* Get the previous month's figures;
PROC SORT
DATA = MONTHS.BAT_TP01 (KEEP = PROGRAM PGMMXTIO)
OUT = MONTH;
BY PROGRAM;
* Get the previous day's figures;
PROC SORT
DATA = DETAIL.BAT_TP01
(KEEP = PROGRAM PGMEXCPS JOB RDRTS)
OUT = YSTRDY;
BY PROGRAM JOB RDRTS;
DATA;
MERGE MONTH (IN = INMONTH)
YSTRDY (IN = INYSTRDY);
BY PROGRAM;
* Only compare CPU time for TPs run the previous month ;
IF INYSTRDY;
IF INMONTH THEN DO;
  IF PGMEXCPS > PGMMXTIO;
END;
ELSE DELETE ;
TITLE "Program Runs Exceeding Last Month's EXCP Max";
PROC PRINT L;
LABEL PGMMXTIO = "Prior Max EXCP Time";
VAR PROGRAM NOTE PGMMXTIO JOB RDRTS PGMEXCPS;

SERVICE UNIT ANALYSIS

PGMMXTSU contains the maximum total service units accumulated
by a jobs step.  The Service Unit (SU) is a resource
utilization measurement that is transferrable between
systems.  Within the limitations of CPU time and EXCP
measurement, the total number of SUs accumulated by a
benchmark or production application should be about the same
on any MVS system.

At summarization levels higher than DETAIL, PGMMXTSU provides
a "worst case" standard against which all executions of this
program can be measured.  For instance, the following SAS
code locates and reports on all of the previous day's job
steps that used more service units than the heaviest run of
the same program the previous month:

* Get the previous month's figures;
PROC SORT
DATA = MONTHS.BAT_TP01 (KEEP = PROGRAM PGMMXTSU)
OUT = MONTH;
BY PROGRAM;
* Get the previous day's figures;
PROC SORT
DATA = DETAIL.BAT_TP01
(KEEP = PROGRAM PGMSERVU JOB RDRTS)
OUT = YSTRDY;
BY PROGRAM JOB RDRTS;
DATA;
MERGE MONTH (IN = INMONTH)
YSTRDY (IN = INYSTRDY);
BY PROGRAM;
* Only compare CPU time for TPs run the previous month ;
IF INYSTRDY;
IF INMONTH THEN DO;
  IF PGMSERVU > PGMMXTSU;
END;
ELSE DELETE ;
TITLE "Program Runs Exceeding Last Month's SU Max";
PROC PRINT L;
LABEL PGMMXTSU = "Prior Max SU";
VAR PROGRAM NOTE PGMMXTSU JOB RDRTS PGMSERVU;

You can use variations of these examples to analyze many of
your site's performance issues.  For more information on the
individual data elements, refer to the CA MICS data
dictionary for the CA MICS Batch and Operations Analyzer.