5. FILES › 5.2 Batch Information Area Files › 5.2.7 APPC/MVS Transaction File (BATATP) › 5.2.7.4 BATATP Retrieval Examples
5.2.7.4 BATATP Retrieval Examples
This section presents typical BATATP retrieval examples.
1. Print all APPC/MVS TPs that executed class MTRANS2A.
DATA;
SET &pBATX..BATATP01;
IF ATPCLASS='MTRANS2A';
PROC PRINT; VAR SYSID ATPCLASS STARTTS ENDTS;
2. Print out the resource consumption of all APPC/MVS ASCH
scheduled TPs with ACCTNO1='D1354'.
DATA;
SET &pBATX..BATATP01;
IF ACCTNO1='D1354' ;
PROC PRINT;
VAR SYSID ACCTNO1 STARTTS ENDTS ATPCPUTM ATPBLKTR
ATPTCNT;
3. Print all APPC/MVS TPs with ATPAPU (TP Application Unit
Identifier) = 'A1200L1' requested by a partner TP at
ATPPLU (Partner LU Name) 'PLU00142'.
DATA;
SET &pBATX..BAT_TP01;
IF ATPAPU='A1200L1' AND ATPPLU='PLU00142' ;
PROC PRINT;
VAR SYSID ATPAPU ATPPLU ATPNAME STARTTS ENDTS
ATPCPUTM ;
4. Print total CPU time consumption by ACCTNO1 over the last
two months APPC/MVS TPs with ATPAPU (TP Application Unit
Identifier) = 'A1200L1' for .
%LET BY = ACCTNO1 ;
%LET BREAK = ACCTNO1 ;
DATA FILE1;
SET &pBATM..BATATP01
&pBATM..BATATP02;
IF ATPAPU='A1200L1';
PROC SORT DATA=FILE1; BY &BY:
DATA FILE1;
SET FILE1;
%ATPSUM;
PROC SORT DATA=FILE1; BY DESCENDING ATPCPUTM ;
PROC PRINT; VAR SYSID ACCTNO1 ATPAPU ATPCPUTM ;
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. For
example, the average monthly TP response time for each
Application Unit Identifier (ATPAPU) can be compared to the
average response time for like TPs run in a single day.
ATPAVTTM contains the average response time for all DETAIL
timespan observations included in the summarized record. The
following SAS code compares the previous months average
against the previous days average and computes the
difference. Only standard scheduled TPs are compared. The
report shows whether yesterdays average was better or worse
than the previous months average.
* Set the summary and data element ;
%LET BY = ATPAPU ;
%LET BREAK = ATPAPU ;
* Get the previous month's figures;
PROC SORT DATA=MONTHS.BATATP01 (KEEP = ATPAPU ATPAVMTM)
OUT=MONTH
BY &BY ;
* Summarize by ATPAPU and set the month elements to unique ;
* names ;
DATA MONTH (DROP=ATPAVTTM ATPCOUNT);
SET MONTH ;
%ATPSUM;
ATPAVMTM=ATPAVTTM ;
ATPMCONT=ATPCOUNT ;
* Get the previous day's figures;
PROC SORT DATA=&pBATX..BATATP01 (KEEP=ATPAPU ATPAVTTM);
OUT=YSTRDY
BY &BY ;
* Summarize by ATPAPU ;
DATA MONTH ;
SET MONTH ;
%ATPSUM;
* Merge month and yesterdays data by ATPAPU ;
* Only select ATPAPU's run both yesterday and last month ;
DATA COMPARE;
MERGE MONTH (IN=INMONTH)
YSTRDY (IN=INYSTRDY);
BY &BY ;
IF INYSTRDY AND INMONTH ;
RESPDIF=ABS(ATPAVTTM-ATPAVMTM) ;
IF ATPAVTTM GT ATPAVMTM THEN DESCRIPT='YESTERDAY WORSE ';
ELSE IF ATPAVTTM LT ATPAVMTM THEN DESCRIPT='YESTERDAY
BETTER';
ELSE DESCRIPT='YESTERDAY SAME ' ;
END ;
PROC PRINT DATA=COMPARE;
LABEL DESCRIPT="Comparison Description";
RESPDIF ="Response Time Difference";
ATPMCONT="Monthly TP Count";
VAR ATPAPU DESCRIPT RESPDIF ATPMCONT ATPCOUNT;
TITLE1 "Comparison of ATPAPU Response Times" ;
TITLE2 "Monthly average versus yesterdays average" ;