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
Constants for these values are defined in the Information Catalog Manager API header file, DG2API.H.
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.
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.
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.
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 );