/*MAIN
 Overview
 
 INITIALIZE is executed to drop any temporary table from the previous reconstruction
    session that may still exist because of an error encountered during the previous
    reconstruction session.  INITIALIZE also initializes the reconstruction events 
    count and truncates the RECIPE table to make way for the current session's 
    recipe.
MAIN*/

/*ARGUMENTS
  Arguments
 
  INITIALIZE takes the following argument which has an IN parameter mode:
   - GFST (VARCHAR2).  This variable represents the name of the Good Frames
     Statistics Table that was posted by Labview just prior to the onset of
     reconstruction.  

ARGUMENTS*/

/*DEPENDENCIES
 Dependencies
 
 The following are the procedures called by INITIALIZE (listed in their
 order of call):
   - SWITCH.  This is the package that manipulates the switches for all
     the reconstruction rules.

   - OPEN_AND_PARSE.  This function combines what would otherwise have
     been separate calls to the native Oracle DBMS_SQL.OPEN_CURSOR and
     DBMS_SQL.PARSE procedures, into a single function.

   - DBMS_UTILITY.GET_TIME.  The GET_TIME function of the native oracle package
     DBMS_UTILITY returns the elapsed time since an arbitrary time in 100ths of 
     seconds

   - EXECUTE_AND_CLOSE.  This function combines what would otherwise have
     been separate calls to the native Oracle DBMS_SQL.EXECUTE and
     DBMS_SQL.CLOSE procedures, into a single function.

   - DROP_OBJECT.  This procedure drops the specified object.

   - TRUNCATE_OBJECT.  This procedure truncates the specified object.

   - POST_STATE.INIT_EVENT.  This procedure of the POST_STATE package initializes
     the reconstruction session's event count.

   - LOG_FILE.  This is a package of procedures which handle the tasks of
     creating the file in which reconstruction output messages will be written
     to, writing to the latter file, and closing it at the end of
     reconstruction.

   - DBMS_SQL.  This the native Oracle dynamic SQL package.
DEPENDENCIES*/

/*VARIABLES
 Variables

 The following are variables used in the procedure:
   - C (INTEGER). Cursor handle.

   - EXECUTE1 (INTEGER).  The number of rows processed by the SQL statement
     if that statement is an UPDATE, INSERT, or DELETE.  If the SQL statement is
     not an UPDATE, INSERT, or DELETE, this value should be ignored.
VARIABLES*/

/*EXAMPLES
  Examples
 
  Here is a call to INITIALIZE:
 
   BEGIN
       INITIALIZE;
   END;
   /

EXAMPLES*/

/*EXCEPTIONS
 Exceptions

 There are no named exceptions for this procedure, except for the generic one
   WHEN OTHERS.  When the latter is triggered, the error message is outputted
   along with the name of the module that erred, and any cursors that may still
   be opened are closed.  
EXCEPTIONS*/

/*ERRORS
 Errors

 There are no errors that this procedure is known to generate.  Should an
   error occur, take action based on the description of the error. 
ERRORS*/

/*TABLES
 Tables
 
 The following table is referenced in this procedure:
   - LOGT.  This is the log table in which the states of all rules are dynamically
     posted and computed before being written to the system_state table.

 For more information on this and other tables, see the documentation on tables.
TABLES*/

/*OTHERS
 Others
 
 It should be noted that with this procedure drops any remaining temporary table
   from the previous session to prevent a failure in the current session when the  
   same table will be recreated.

 Also note that in this procedure table LOGT is updated through INSERT and UPDATE
   statements whereas in other procedures (except UNLOAD and UPDATE_MNFFPT, 
   RECONSTRUCTION1, RECONSTRUCTION2, and RECONSTRUCTION3), table LOGT is updated 
   through the RULES_STATES package.  The reason for the latter is because the
   the events count has not been initialized through procedure POST_STATE.INIT_EVENT.

 For more details on this procedure see the reconstruction documentation.
OTHERS*/
