The gsysInitTimeCode Stored Procedure
ICON uses the gsysInitTimeCode stored procedure to populate the G_TIMECODE table. The figure below shows the three tables that are involved in the time-setting procedure.
The following subsections describe each of these tables, and how they are used in the time-setting procedure.
G_LOG_MESSAGES and G_LOG_ATTRS
- The G_LOG_MESSAGES table contains information about the start (MESSAGE_ID = 5040) and end (MESSAGE_ID = 5050) of the time-setting procedure, as well as information about any errors (MESSAGE_ID = 5045) that occurred while the procedure was running.
- The G_LOG_ATTRS table contains the error descriptions (code and message) and detailed information about the processed data.
- You can read information from these two tables by using Genesys SCI.
After the time-setting procedure is executed, the G_TIMECODE table is filled, based on the input parameters for the procedure. You can use the G_TIMECODE table to create time-interval reports. The ID field in this table is related to the *_TCODE fields in other tables, and it represents the amount of time, in seconds, counted in five-minute intervals, since January 1, 1970.
Setting Up the Time-Setting Procedure
No setup is required in order to execute the time-setting procedure.
Executing the Time-Setting Procedure
Execute the time-setting procedure as often as required, using the following input parameters:
- BEGIN_DATE—The date of the first interval.
- END_DATE—The date of the last interval.
To execute the time-setting procedure, use the following statement (the exact syntax depends on the RDBMS):