C H A P T E R  13

Diagnostic Tools

This chapter describes the tracing and dumping facilities Sun MTP provides. Do not use these facilities unless you are instructed to do so by your authorized service provider. The topics in this chapter include:


Using the Sun MTP Trace Facility

The Sun MTP trace facility enables you to selectively trace low-level routines. Use it only under the direction of a technical support engineer. This internal tracing facility increases the amount of shared memory that Sun MTP allocates. Each of the following processes has a trace table allocated for it in shared memory:

The default size of each trace table is 80,000 bytes.

The following formula shows how much shared memory is required for tracing for a Sun MTP region.

(tx-procs + 6) * 80,000 = bytes

Add the number of transaction processors to 6, which is the number of static shared memory processes, and then apply the formula. In the following example, the region has 8 transaction processors, so 14 processes are used to calculate the shared memory requirements.

14 * 80,000 = 1,120,000 bytes

Sun MTP will allocate 1,120,000 bytes of shared memory for internal tracing.

After you calculate the shared memory requirements for the extended trace facility, you must add that number to the shared memory requirements of your application to get the total shared memory requirement. When starting Sun MTP, provide this value with the -S option to unikixmain.

Use the kixetrace utility to display the Trace Administration Utility menu.

  FIGURE 13-1 Trace Administration Utility Menu

Screen shot showing the Trace Administration Utility menu.[ D ]

An asterisk (*) is displayed next to any option that is selected.

When the trace facility is first run, the menu always shows Production trace on as selected. This does not mean that production trace is turned on; it is the default. The menu does not indicate the options with which Sun MTP is running.

The kixeformat utility is provided to format internal trace dumps. It should only be used under the direction of your authorized service provider. The Sun Mainframe Transaction Processing Software Reference Guide describes the command format for this utility.

Dump Facilities

Sun MTP provides two methods for dumping system information that you can use to help determine the cause of problems:

Application Dump Facility

The application dump facility produces a formatted dump file that lists an application's runtime environment under the following circumstances:

The application dump file is written to the $KIXSYS directory and the name of the file is printed in the log file with message number KIX6702I. The dump file name is a combination of the transaction name and a sequence number; for example, AC010000.prt.

The formatted dump file includes the following information:

The application dump facility also writes the following information to unikixmain.err and unikixmain.log:

Enabling and Disabling the Dump Facility

Although an application dump file is generated by default, you can explicitly enable the dump facility using either of the following options:

To turn off the dump facility, use either of these options:

Identifying Where the Transaction Abended

The unikixmain.log file contains information about the transaction failure. It provides the name of the transaction, the name of the program, and the last four CICS commands executed by the transaction. Each CICS command provides the following information:

The CID# reference helps to locate the CICS command(s) that was executed. This reference number is generated by the kixclt translator. By searching for the CID# reference in the output of the kixclt translator (a *.cbl file for COBOL), you can locate the CICS command that was executed.

unikixmain.err and unikixmain.log Entries

When the application dump facility is enabled, entries are written to unikixmain.err and unikixmain.log that look similar those in the following example.


08/19/2002 13:40:40 unikixtran2 :--------------------------------------------
08/19/2002 13:40:40 unikixtran2 :Transaction AC01  program ACCT01    has abended
08/19/2002 13:40:40 unikixtran2 :Function ENDBR             CID# 00001113 Condition FILENOTFOUND
08/19/2002 13:40:40 unikixtran2 :Transaction was  executing MTP code
08/19/2002 13:40:40 unikixtran2 :Previous functions:
08/19/2002 13:40:40 unikixtran2 :Function READNEXT          CID# 00001100 Condition Successful
 
08/19/2002 13:40:40 unikixtran2 :Function READNEXT          CID# 00001100 Condition Successful
08/19/2002 13:40:40 unikixtran2 :Function READNEXT          CID# 00001100 Condition Successful
08/19/2002 13:40:40 unikixtran2 :---------------------------------------------
08/19/2002 13:40:40 unikixtran2 :Formatted dump requested, file is AC010000.prt
.
.
. (more log not shown)

In this example, CID# 00001113 is the command that failed. In the source program, ACCT01.cbl, a search for 0001113 displays the following code:

* EXEC CICS ENDBR DATASET('ACCTIT') END-EXEC.
	MOVE 'ACCTIT' TO DFHEIV1
	MOVE 0 TO DFHEIV11
	MOVE '&2                    $   #00001113' TO DFHEIV0
	CALL 'kxdfhei1' USING DFHEIV0,
		DFHEIV1,
		DFHEIV11,
		DFHEIV99
	GO TO 9999-DFHEXIT DEPENDING ON DFHEIGDK.

Dump File Output

The dump file generated for a COBOL program looks similar to the example in CODE EXAMPLE 13-1.

When interpreting the information in the dump file, note the following:

The dump file generated for a C program looks similar to the example in CODE EXAMPLE 13-2.

CODE EXAMPLE 13-2 Dump File-- C (1 of 3)
03/08/1999  15:40:09.000  unikixtran2 Formatted Dump File
 
Run-Time Error:
C Application ERROR
 
Transaction: XTBM has abended in Program: XXTBMU  
Failure occured in Application code
CICS Command Level Trace:
      Function GETMAIN          CID# 00000020 Condition Successful
      Function SEND MAP         CID# 00000013 Condition Successful
      Function ADDRESS          CID# 00000045 Condition Successful
      Function ADDRESS          CID# 00000001 Condition Successful
 
Current address on heap     (400b1000)
Address of Shared Memory    (4086c000)
Address of Max Core         (4086c000)
Address of Threshold Memory (4056c000)
 
******************  Exec Interface Block   ******************
EIBTIME   0154008c              EIBSYNC   00
EIBDATE   0099067c              EIBFREE   00
EIBTRNID  XTBM                  EIBRECV   00
EIBTASKN  0000002c              EIBSEND   00
EIBTRMID  C003                  EIBATT    00
DFHEIGDI  0000                  EIBEOC    00
EIBCPOSN  0004                  EIBFMH    00
EIBCALEN  000c                  EIBCOMPL  00
EIBAID    27                    EIBSIG    00
EIBFN     0c02                  EIBCONF   00
EIBRCODE  000000000000          EIBERR    00
EIBDS                           EIBERRCD  00000000
EIBREQID                        EIBSYNRB  20
EIBRSRCE                        EIBNODAT  00
EIBRESP   00000000
EIBRESP2  00000000
 
*********************************   CWA   ***************************
No Common Work Area present
 
*********************************   TCTUA   *************************
TCTUA LENGTH = 255
c24a0a80 00000000  20202020 20202020 20202020 20202020  *                *
c24a0a90 00000010  20202020 20202020 20202020 20202020  *                *
c24a0aa0 00000020  20202020 20202020 20202020 20202020  *                *
c24a0ab0 00000030  20202020 20202020 20202020 20202020  *                *
c24a0ac0 00000040  20202020 20202020 20202020 20202020  *                *
c24a0ad0 00000050  20202020 20202020 20202020 20202020  *                *
c24a0ae0 00000060  20202020 20202020 20202020 20202020  *                *
c24a0af0 00000070  20202020 20202020 20202020 20202020  *                *
c24a0b00 00000080  20202020 20202020 20202020 20202020  *                *
c24a0b10 00000090  20202020 20202020 20202020 20202020  *                *
c24a0b20 000000a0  20202020 20202020 20202020 20202020  *                *
c24a0b30 000000b0  20202020 20202020 20202020 20202020  *                *
c24a0b40 000000c0  20202020 20202020 20202020 20202020  *                *
c24a0b50 000000d0  20202020 20202020 20202020 20202020  *                *
c24a0b60 000000e0  20202020 20202020 20202020 20202020  *                *
c24a0b70 000000f0  20202020 20202020 20202020 202020    *                *
 
*********************************   COMMAREA   ***************************
COMMAREA LENGTH: 12
c2335880 00000000  44656C74 61585442 4D540000           *DeltaXTBMT..    *
 
******************************  WORKING-STORAGE **************************
PROGRAM:XXTBMU  
7afcd3e0 00000000  00                                   *.                *