DB2 Server for VSE & VM: Operation


Formatting DB2 Server for VM Trace Output

The trace formatter is a DB2 Server for VSE & VM-supplied program that transforms the information on the trace tape into a printed report. You control the trace formatter by supplying control statements as input.
Note:You should not attempt to use the trace formatter in the CMS Subset environment.

The trace formatter is invoked through an EXEC called SQLTRFMT. To invoke the SQLTRFMT EXEC, enter SQLTRFMT.



>>-SQLTRFMT----------------------------------------------------><
 

The SQLTRFMT EXEC issues the following CMS command to define the trace formatter's default input file:



 FILEDEF ARITRAC TAP2 SL (NOCHANGE

Notes:

  1. The SQLTRFMT EXEC does not issue a CMS LABELDEF command.

  2. The ARITRAC FILEDEF command used for the formatter must correspond to the ARITRAC FILEDEF command used for the trace itself. If you enter your own trace file ARITRAC FILEDEF command for the trace, you must enter the same FILEDEF command before invoking the SQLTRFMT EXEC.

  3. If you want the additional standard label checking provided by the CMS LABELDEF command, you must enter the LABELDEF command before invoking the SQLTRFMT EXEC. The LABELDEF file name, ddname, must be ARITRAC.

  4. The trace formatter does not require the application server to be running. You must, however, have read access to the production minidisk to run the trace formatter.

  5. The trace formatter cannot run in CMS DOS mode. If you run the trace formatter in CMS DOS mode, the CMS session ends abnormally.

If you are tracing to tape, you must ensure that the trace tape is mounted on virtual device number 182 or the virtual device number specified in your (optional) FILEDEF command, before invoking the SQLTRFMT EXEC.

If you direct the trace output to a CMS file, you must enter a CMS FILEDEF command for the file before invoking the SQLTRFMT EXEC. Use the same FILEDEF that you entered before invoking the SQLSTART EXEC to start the trace. Refer to Tracing to a CMS File for use of the FILEDEF command.

Before invoking the SQLTRFMT EXEC, run the SQLINIT EXEC, if you have not already done so. This ensures that the trace formatter can use the resource adapter to generate messages. For more information on the SQLINIT EXEC and resource adapter tracing, refer to the DB2 Server for VSE & VM Diagnosis Guide and Reference manual.

During its processing, the SQLTRFMT EXEC invokes XEDIT to edit a card-image CMS file called SQLTRFMT SQLTRACE A1. The first time you issue the SQLTRFMT EXEC, you can see that the file is empty. The SQLTRFMT EXEC creates it on your A-disk. You should place the trace formatter control statements in this file. The trace formatter control statements are explained in the section Trace Formatter Control Statements.

When you are finished entering the control statements, use the PF3 key to file the results and continue processing, or you can use the XEDIT command FILE. The SQLTRFMT SQLTRACE is then stored on your A-disk and is used as the SYSIN file for the trace formatter program.

The SQLTRFMT EXEC then prompts as to whether you want to direct the trace output to the virtual printer or to a CMS file. If you choose to print the data, the SQLTRFMT EXEC prints to the virtual printer 00E. If you want, you can enter CP SPOOL and TAG commands before invoking the SQLTRFMT EXEC to direct the output to a particular class or device. If you want the output directed to a CMS file, the SQLTRFMT EXEC prompts you for a file name, file type, and as an option, file mode. If you do not specify a file mode, the trace formatter uses A1.

The trace formatting program can generate considerable output. You should ensure that there is enough space on your A-disk or other specified minidisk before directing trace formatter output to a CMS file.
Note:The output file contains 121-character records. The first character is an ANSI carriage control character. If you route your output to a CMS file and later want to print the file, use the CC option on the PRINT command to indicate that the carriage control characters are present.

After you specify where you want the formatted output to go, the SQLTRFMT EXEC invokes the program that formats the trace data. Upon completion, the SQLTRFMT EXEC returns control to CMS. If any control statements are in error, the trace formatter program prints messages in the output CMS file or to the virtual printer (whichever you selected). The SQLTRFMT EXEC displays a message that indicates whether it ran successfully or encountered an error.

The SQLTRFMT SQLTRACE A1 is not erased upon completion. On subsequent runs, the SQLTRFMT EXEC invokes XEDIT for this file and lets you modify it.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]