Grouping by APPLID

The following query summarizes all transactions that ran yesterday, grouping by APPLID.
SELECT APPLID,                                                      
       INT(SUM(TASKCNT))                        AS TASK_COUNT,      
       DEC(SUM(CPU_TIME),16,4)                  AS TOTAL_CPU,       
       DEC(SUM(CPU_TIME)/SUM(TASKCNT),5,4)      AS AVE_CPU,         
       DEC(SUM(RESPONSE_TIME)/SUM(TASKCNT),5,4) AS AVE_RESPONSE     
FROM CICSPA.CICSPX                                               
WHERE START_DATE = CURRENT_DATE - 1 DAY                             
GROUP BY APPLID                                                     
ORDER BY APPLID                                                     
This query produces output like the following:
Figure 1. SQL query grouping yesterday's transactions by APPLID
                 TASK                TOTAL       AVE       AVE    
APPLID          COUNT                  CPU       CPU  RESPONSE 
--------  -----------  -------------------  --------  -------- 
CICSP1            900              10.1467    0.0112    0.1520 
CICSP2            520               1.0163    0.0019    0.1647 
CICSP3            972               6.4394    0.0066    0.0882 
CICSP4             36               0.6607    0.0183    0.2049 
CICSP5            504               5.7875    0.0114    0.1400 
CICSP6            504               5.6444    0.0111    0.1202 
CICSP7            504               5.7117    0.0113    0.1021 
CICSP8            540               6.1050    0.0113    0.1508 
CICSP9            540               5.9684    0.0110    0.1515 
CICSP10           180               1.6885    0.0093    0.1451 

Information Information

Feedback


Timestamp icon Last updated: Saturday, 8 February 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic///users-guide/cpaug323.htm