Saturday, August 31, 2024

Mainframe tools associated with performance

 Below is the list of tools categorized to assist in the management of Mainframe performance

Mainframe Monitoring tools
Omegamon
BMC AMI Ops Monitoring(Formerly Mainview)
Sysview
ASG TMON
 
Code Profiling tools
IBM APA
TRITUNE
Strobe
Macro4 Freezeframe
CA Mainframe Aapplication Tuner(CA MAT)
 
Mainframe Performance Reporting tools
IBM Z IntelliMagic Vision for z/OS
Pivotor from EPS inc
IBM Z Performance and Capacity Analytics (IZPCA)
MXG
CA MICS
IBM Tivoli Decision Support for z/OS(TDSz)
Syncsort™ Capacity Management
Zetaly Service Intelligence
SAS ITRM
zWorkload Reporter
EasySMF for z/OS
 
DB2 SQL monitoring tools
IBM Query Monitor
BMC Apptune
CA Detector
 
SMF Streaming tools
IBM Common Data Provider for z Systems (CDPz)
Precisely’s Ironstream

Tuesday, August 27, 2024

Why/When AICA abend happens in CICS region

Following content is copied from https://planetmainframe.com/2023/08/cics-programming-best-practices/

The option ICVR (Interval Control Value Runaway) is the amount of Task time that a task can consume between Calls to CICS. You see CICS is a very friendly system; it just says that you can freely use my services, you just have to talk to me once in a while. However, if you don’t talk to me, then I’m going to assume that you are looping and abend you. How does it do this? When you issue an EXEC CICS command and CICS processes your request, then control returns to your program. CICS then starts a Clock and decrements it while you have the CPU processing your COBOL/Assembler statements. If the Clock falls to zero, CICS, by Interval Control, will abend your task AICA.  Actually, it’s quite clever; it abends the Task with an S0C1 (Operation Exception). ICVR controls this Clock and it’s specified in the Overrides and changeable online by a CEMT SET SYSTEM command. 2000 milliseconds (2 seconds) is the default. This is a system-wide value but can be specified differently for each transaction. 


Thursday, August 1, 2024

Dealing with Null Output

The AVG, MIN, MAX, and SUM functions almost always return a null value when there are no matching rows (see No Rows Match for exceptions). One can use the COALESCE function, or a CASE expression, to convert the null value into a suitable substitute. Both methodologies are illustrated below:

Convert null output (from AVG) to zero


SELECT COUNT(*) AS c1
, AVG(salary) AS a1
, COALESCE(AVG(salary),0) AS a2
, CASE
WHEN AVG(salary) IS NULL THEN 0
ELSE AVG(salary)
END AS a3
FROM staff
WHERE id < 10;

ANSWER

C1

A1

A2

A3

0

null

0

0


No Rows Match

How many rows are returned by a query when no rows match the provided predicates? The answer is that sometimes you get none, and sometimes you get one:

 Query with no matching rows (1 of 8)

 SELECT creator

FROM sysibm.systables

WHERE creator = 'ZZZ';

ANSWER: no row

Query with no matching rows (2 of 8)

SELECT MAX(creator)

FROM sysibm.systables

WHERE creator = 'ZZZ';

ANSWER: Null

Query with no matching rows (3 of 8)

SELECT MAX(creator)

FROM sysibm.systables

WHERE creator = 'ZZZ'

HAVING MAX(creator) IS NOT NULL;

ANSWER: no row

Query with no matching rows (4 of 8)

SELECT MAX(creator)

FROM sysibm.systables

WHERE creator = 'ZZZ'

HAVING MAX(creator) = 'ZZZ';

ANSWER: no row

Query with no matching rows (5 of 8)

SELECT MAX(creator)

FROM sysibm.systables

WHERE creator = 'ZZZ'

GROUP BY creator;

ANSWER: no row

Query with no matching rows (6 of 8)

SELECT creator

FROM sysibm.systables

WHERE creator = 'ZZZ'

GROUP BY creator;

ANSWER: no row

Query with no matching rows (7 of 8)

SELECT COUNT(*)

FROM sysibm.systables

WHERE creator = 'ZZZ'

GROUP BY creator;

ANSWER: no row

Query with no matching rows (8 of 8)

SELECT COUNT(*)

FROM sysibm.systables

WHERE creator = 'ZZZ';

ANSWER: 0

There is a pattern to the above, and it goes thus:

  • When there is no column function (e.g. MAX, COUNT) in the SELECT then, if there are no matching rows, no row is returned.
  • If there is a column function in the SELECT, but nothing else, then the query will always return a row - with zero if the function is a COUNT, and null if it is something else.
  • If there is a column function in the SELECT, and also a HAVING phrase in the query, a row will only be returned if the HAVING predicate is true.
  • If there is a column function in the SELECT, and also a GROUP BY phrase in the query, a row will only be returned if there was one that matched.

 The above documentation is copied from https://db2-sql-cookbook.org/