Tuesday, March 5, 2019

Cobol




Step 1 - Navigate to the ‘Process Types ’ component and select the Process Type as ‘COBOL SQL’ and the Appropriate Operating System and Database Type.

Operating System:     should be the Process Scheduler Server where the Process is being run (let’s use ‘NT’ as an example).

Database Type:          should be the type of database where the process is run (let’s use ‘Microsoft’ as an example).

People Tools>> Process Scheduler >> Process Types



Step 2 - Copy the data from the ‘Parameter List’ field.

Here is an example:

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


Step 3 - Navigate to the ‘Processes’ component and select the COBOL process that you would like to get a trace on.

Step 4 - Go to the ‘Override Options’ tab. Set the ‘Parameter List’ option to ‘Override’ and paste in the text field the data you copied at step 3. Add then the sum of all the Trace Options you want to use in between INSTANCE and DBFLAG as shown below and save.

%%/%%INSTANCE%%/3/%%DBFLAG%%

Here is the list of Trace Options and associated numbers for each option:

; 1 = SQL Statements
; 2 = SQL statement variables
; 4 = SQL connect, disconnect, commit and rollback
; 8 = Row Fetch (indicates that it occurred, not data)
; 16 = All other API calls except SSBs
; 32 = Set Select Buffers (identifies that attributes of columns to be selected.
; 64 = Database API specific calls
;128 = COBOL statement timings
;256 = Sybase Bind information
;512 = Sybase Fetch information

To turn traces on, sum all the options you want to use and enter the results in between INSTANCE and DBFLAG as shown above. For example, to enable tracing SQL statements (1), SQL statement variables (2) SQL connect, disconnect, commit and rollback (4), Row Fetch (8), and COBOL statement timings (128) you should use ‘255’ (1+2+4+8+16+32+64+128).

 Step 5 - Go ahead and run the COBOL process that you would like to get a trace on. Make sure to run the process on the Operating System you chose at step 2 (‘NT’ in the example).

Note down the Process Instance (252 in our example).



Step 6 - Get the trace file.

Location:
%%PS_HOME%%\appserv\prcs\\log_output\CBL__
Example:
\\Gsamas06\E\mss\e841g70n\appserv\prcs\e802f72a\log_output\CBL_INPSSTGE_544

File name:      cobsql_.trc
Example:       cobsql_252.trc

No comments:

Post a Comment