COBOL SQL Trace

This article explains how to enable a COBOL SQL trace on a COBOL process definition.

Determine the COBOL SQL Process Parameters

Navigate to PeopleTools > Process Scheduler > Process Types and open the COBOL SQL process appropriate for your operating system and database platform (e.g. UNIX and Oracle).

cobol-sql-parameter-list.png

Copy the text in the Parameter List excluding %%PRCSNAME%% (not required).

%%DBTYPE%%/%%DBNAME%%/%%OPRID%%/%%OPRPSWD%%/%%RUNCNTLID%%/%%INSTANCE%%//%%DBFLAG%%

Override the Process Definition Parameter List

Navigate to PeopleTools > Process Scheduler > Processes and open your COBOL process definition. In this example, I've using the PTPDBTST simple COBOL test program delivered with PeopleTools. In the override options, set the parameter list option to override.

Paste the parameter list you copied into here, but make one small change. Just before %%DBFLAG%% there are two slashes //. In between these slashes enter your trace SQL bit mask. I normally use 135. So the parameter list should now look like this:

%%DBTYPE%%/%%DBNAME%%/%%OPRID%%/%%OPRPSWD%%/%%RUNCNTLID%%/%%INSTANCE%%/135/%%DBFLAG%%
cobol-sql-process-definition-trace-override.png

Run your COBOL as normal

Run your COBOL through the appropriate run control page.

In the view log/trace file list you should see a file with the extension .trc. This is the COBOL SQL trace with timings.

cobol-trace-file-in-process-monitor-file-list.png

Comments

COBOL Timings Trace

There are some really helpful instructional videos on My Oracle Support (you'll need an account) that go through how to do a COBOL timings trace and troubleshoot COBOL performance issues.

The links are to the How To documents are:

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License