CA Datacom SQL Path Report like DB2 EXPLAIN

book

Article ID: 127839

calendar_today

Updated On:

Products

CA Datacom CA DATACOM - AD CA CIS CA Common Services for z/OS CA 90s Services CA Database Management Solutions for DB2 for z/OS CA Common Product Services Component CA Common Services CA Datacom/AD CA ecoMeter Server Component FOC CA Easytrieve Report Generator for Common Services CA Infocai Maintenance CA IPC Unicenter CA-JCLCheck Common Component CA Mainframe VM Product Manager CA Chorus Software Manager CA On Demand Portal CA Service Desk Manager - Unified Self Service CA PAM Client for Linux for zSeries CA Mainframe Connector for Linux on System z CA Graphical Management Interface CA Web Administrator for Top Secret CA CA- Xpertware

Issue/Introduction



Can CA Datacom produce a report of the access path for a SQL statement similar to a DB2 EXPLAIN?
 

Environment

Release:
Component: DB

Resolution

There is no EXPLAIN command in CA Datacom but a report on the access path can be obtained from the SQL Query Optimization Messages.
The optimization messages are produced by turning on traces TRACE=TRACEMSG and TRACE=TRACEDETAIL
The messages are written to the PXX and to the SYSADM.SYSMSG table. 

To turn on the traces run DBUTLTY with:

COMM OPTION=ALTER,TRACE=NONE
COMM OPTION=CLRPXX
COMM OPTION=ALTER,TRACE=TRACEMSG,JOBNAME=jobname
COMM OPTION=ALTER,TRACE=TRACEDETAIL,JOBNAME=jobname


Run the application or run the query with DBSQLPR then turn off the trace by running DBUTLTY with:

COMM OPTION=ALTER,TRACE=NONE


To print the trace run DBUTLTY with:

REPORT AREA=PXX,DUMPS=TRACE

Alternatively run DBSQLPR to query the SYSADM.SYSMSG table:

SELECT * FROM SYSADM.SYSMSG WHERE PLANNAME = 'plan_name';

Additional Information

See DocOps section SQL Query Optimization Messages