Information Catalog Manager Programming Guide and Reference

FLGTrace

Sets the level of information about the Information Catalog Manager function written in the trace (.TRC) file.

Authorization

Administrator or user

Syntax



APIRET  APIENTRY   FLGTrace( FLGTRACEOPTION   TraceOpt,
                             PFLGEXTCODE      pExtCode );

Parameters

TraceOpt (FLGTRACEOPTION) -- input
Indicates the desired trace option. Valid options are:

0
The default. Include all messages and warning, error, and severe error conditions.

1
Include entry and exit records of the highest-level Information Catalog Manager functions.

2
Include extremely granular entry and exit records of the Information Catalog Manager functions.

3
Include input and output parameters (excluding input or output structure)

4
Include all input or output structures that are passed to and used by the Information Catalog Manager, including SQLCA information passed to and used by the underlying database management system.

Constants for these values are defined in the Information Catalog Manager API header file, DG2API.H.

pExtCode (PFLGEXTCODE) -- output
Points to an extended code associated with the reason code. See Appendix D, Information Catalog Manager reason codes to see if a meaningful extended code is associated with the returned reason code.

Reason code (APIRET)
Represents the execution result of this API call.

See Appendix D, Information Catalog Manager reason codes for an explanation of the returned reason codes.

Usage

The name of the trace file is the name of the information catalog you are using with the extension of .TRC.

When you use trace files to debug your programs, levels 0 and 4 are most likely to be useful to you.

Level 0
Returns information explaining the functions that the Information Catalog Manager is performing.

When the Information Catalog Manager encounters an error, it inserts the reason code and extended code for that error into the trace file as the New Reason Code and the New Extended Code. The trace file also contains an Old Reason Code and an Old Extended Code, which contain the reason code that was returned before the error occurred. Any messages that the Information Catalog Manager produces in the trace file.

Level 4
Returns the same information as for Level 0, more detailed functional information about the Information Catalog Manager, and information about the data structures passed to and from the Information Catalog Manager, including input structures, output structures and SQLCA structures from the database.

Tracing the contents of these structures can be valuable when you need to determine the cause of data errors or ensure that the contents of an input or output structure is being produced or read properly.

For more information about using trace files, see the Information Catalog Manager Administration Guide.

Examples

Figure 153 shows the C language code required to invoke the FLGTrace API call. This sample code sets the level of tracing from an information application.

Figure 153. Sample C language call to FLGTrace

.
 FLGTRACEOPTION TraceOpt   = FLG_TRACELEVEL_1; // Turn on Entry/Exit Tracing
 FLGTRACEOPTION TraceReset = FLG_TRACELEVEL_0; // Reset to default level
 APIRET         rc;                       // reason code
 FLGEXTCODE     ExtCode = 0;                   // Extended code
 
 .
 .  // FLGInit()
 .  // calls to the FLG API
 
 rc = FLGTrace ( TraceOpt,
               &ExtCode );
 .
 .  // Check rc and ExtCode
 .
 .  // More API calls
 .
 
 rc = FLGTrace ( TraceReset,
               &ExtCode );


[ Top of Page | Previous Page | Next Page ]