CA JARS provides a routine, EARLGRAF, which allows the creation of mainframe graphs with CA Earl. Examples of mainframe graphs are available in CAJREARL as members SYSDAY1, SYSDAY2, and SYSWEEK1. An overview of what is necessary to produce mainframe graphs is described below along with the required input statements.
The variable E1 is the value representing the length of the bar graph line. In this case the TSO_RESP time as a percentage of the fixed amount 5.0 (5 seconds). A response of 1 second would cause the value in E1 to be 20 (e.g., 20%).
This function call requires various parameters to be passed in a certain format. The first parm (STARS) is the returned character variable, filled with graph characters. The second parm (STARLEN) is a fullword (B 10.0) which is set to the length of the first parm. The remaining parms are really pairs of parms. The first is the value to be plotted (E1 in this case), the second parm in the pair is the plot character (ASTS in this case).
for example:
DEF STARS (70) = ' ' ' PLOT PERCENTAGE' DEF STARLEN (B 10.0) = 100 DEF E1 (B 10.0) = 0 DEF ASTS (1) = '*'
Note: The numeric parms must be defined as (B 10.0).
The following example illustrates the required input statements.
OPTION PRINTER = 132 PAGE = 60
HISTIN: FILE JARS RECORD=3697
DEF INAREA 1-3697 X
COPY MRXTHDR
COPY MRXT72P
DEF REC_HHMM = RECTIME 1-4 N 'INTERVAL' 'END TIME' PIC '99:99'
DEF TSO_RESP (5.2) = 0 'TSO' 'RESPONSE TIME'
DEF STARLEN (B 10.0) = 100
DEF E1(B 10.0) = 0
DEF DASHER (1) = '-'
DEF ASTS (1) = '*'
DEF START (70) = ' ' 'PLOT PERCENTAGE'
'----+----1----+----2----+----3----+----4----+----5----+----6----+----7'
DEF STARA (30) = ' ' ' '
'----+----8----+----9----+----0'
IF PROCID NOT = ':'
THEN GOTO START
ENDIF
IF EXTTYPE = 'R72P' AND EXT72P_SYS = 'TSO ' THEN
IF EXT72P_TTX > 0 THEN
SET TSO_RESP = EXT72P_TTM / EXT72P_TTX
ELSE
SET TSO_RESP = 0
ENDIF
ELSE
GOTO START
NOTE *******************************************************************
NOTE * REPORT R72P *
NOTE *******************************************************************
REPORT 'R72P - TSO PERIOD 1 RESPONSE TIME'
TITLE @1 'SYSID = ' @10 SID
TITLE @1 'DATE = ' @17 RECDATE
TITLE '100% = 5.00 SECONDS'
SELECT EXTTYPE = 'R72P' AND EXT72P_PRD = 1 AND SID = 'XAD1'
CONTROL (SID) SKIP (RECDATE) SKIP REC_HHMM
SET(D) E1 = TSO_RESP * 100 / 5.0
IF(D) E1 > 100 THEN
SET(D) E1 = 100
CALL (D) EarlGRAF USING STARS STARLEN E1 DASHES
ELSE
CALL(D) EarlGRAF USING STARS STARLEN E1 ASTS
ENDIF
PRINT @9 REC_HHMM @30 TSO_RESP @31 '|' @32 &STARS. @102 &STARA. @132 '|'
IFTAG 0;PRINT &STARLEN. &ASTS. &DASHES.
!
END
The following report is produced from the previous input statements.
01/02/98 R72P - TSO PERIOD 1 RESPONSE TIME PAGE 1 SYSID = XAD1 DATE = 98/01/19 100% = 5.00 SECONDS ---------------------------------------------------------------------------------------------------------------------------------- INTERVAL TSO PLOT PERCENTAGE END TIME RESPONSE TIME ----+----1----+----2----+----3----+----4----+----5----+----6----+----7 ---------------------------------------------------------------------------------------------------------------------------------- 00:00 3.07 |************************************************************* 00:15 3.45 |********************************************************************* 00:30 3.75 |*************************************************************************** 00:45 2.57 |*************************************************** 01:00 1.72 |********************************** 01:15 2.39 |*********************************************** 01:30 4.35 |*************************************************************************************** 01:45 4.67 |********************************************************************************************* 02:00 4.18 |*********************************************************************************** 02:15 4.36 |*************************************************************************************** 02:30 4.77 |*********************************************************************************************** 02:45 4.20 |************************************************************************************ 03:00 3.38 |******************************************************************* 03:15 2.28 |********************************************* 03:30 1.58 |******************************* 03:45 1.61 |******************************** 04:00 1.47 |***************************** 04:15 1.30 |************************** 04:30 1.26 |************************* 04:45 1.53 |****************************** 05:00 1.81 |************************************ 05:15 1.45 |***************************** 05:30 1.96 |*************************************** 05:45 2.00 |**************************************** 06:00 1.40 |**************************** 06:15 1.02 |******************** 06:30 1.42 |**************************** 06:45 1.29 |************************* 07:00 2.31 |********************************************** 07:15 3.01 |************************************************************ 07:30 2.54 |************************************************** 07:45 1.87 |************************************* 08:00 1.52 |****************************** 08:15 1.59 |******************************* 08:30 1.45 |***************************** 08:45 0.98 |******************* 09:00 1.02 |******************** 09:15 0.77 |*************** 09:30 0.68 |************* 09:45 0.88 |***************** 10:00 1.08 |********************* 10:15 0.80 |**************** 10:30 0.63 |************ 10:45 0.78 |*************** 11:00 0.70 |************** 11:15 0.87 |***************** 11:30 0.73 |************** 11:45 0.78 |*************** 12:00 0.87 |***************** 12:15 0.84 |**************** 12:30 0.84 |****************
| Copyright © 2012 CA. All rights reserved. |
|