/*MAIN
 Overview
 
 ACTION_CS_00 is a procedure that contains the necessary steps to take
    when within a conseq, there is no unpacked major frame datetime and
    no unpacked major frame counter.  This state is represented by the
    last two characters in the name of the procedure (00).  ACTION_CS_00 is
    stored as a VARCHAR2 action item in table CS_LOOKUPT, table which contains
    all the other actions to take depending on the state of the conseq.
MAIN*/

/*ARGUMENTS
  Arguments
 
  ACTION_CS_00 takes the following arguments, all of which have an IN 
  parameter mode:
   - NEID1 (INTEGER).  This variable represents the lower boundary of the
     conseq in examination.

   - NEID2 (INTEGER).  This variable represents the upper boundary of the
     conseq in examination.  Note that NEID2 is not included in the conseq.

   - GFST (VARCHAR2).  This variable represents the Good Frames Statistics
     Table that was posted by Labview just prior to the onset of reconstruction.

   - BFST (VARCHAR2).  This variable represents the Bad Frame statistics Table
     that was posted by Labview just prior to the onset of reconstruction.

   - NUM_DT (INTEGER).  This variable represents the number of distinct not
     null floating point datetimes present in the conseq, with no Minor Frame
     Failing Flag (MNFFF) or date error (DATEERR) flag raised in the BFST.

   - NUM_UMFC (INTEGER).  This variable represents the number of distinct not
     null major frame counter present in the conseq, with no Minor Frame
     Failing Flag (MNFFF) raised in the BFST.
ARGUMENTS*/

/*DEPENDENCIES
 Dependencies
 
 The following are the procedures called by ACTION_CS_00:
   - BFST_CALC_TIME_GRT.  This procedure computes the major frame
     floating point datetime in the conseq based on the floating point
     ground receipt datetime.

   - DBMS_SQL.  This the native Oracle dynamic SQL package;

   - 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.

   - 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.

   - DBMS_OUTPUT.PUT_LINE.  This native oracle package writes to the
     buffer.
DEPENDENCIES*/

/*VARIABLES
 Variables

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

   - DATETIME_GRT (NUMBER).  Major frame floating point datetime
     computed based on the minor frame floating point ground recept datetime.

   - 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 ACTION_CS_00
 
   BEGIN
       ACTION_CS_00 (1, 100, WINDxxxGOOD, WINDyyyBAD, 0,0);
   END;
   /
 
 The arguments for this procedure are passed in from procedure 
   BFST_FILL_TIMES.
EXAMPLES*/

/*EXCEPTIONS
 Exceptions

 There are no named exceptions for this procedure, execpt for the generic one
 WHEN OTHERS.  When the latter is triggered, the error message is outputed
 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 tables are referenced in this procedure:
  - GFST. This is the Good Frames Statistics Table that was posted by
    Labview just prior to the onset of reconstruction.

  - BFST. This is the Bad Frame statistics Table that was posted by Labview
    just prior to the onset of reconstruction.

 For more information these and other tables, see (xxxx).
TABLES*/

/*OTHERS
 Others
 
 It should be noted that when procedure BFST_CALC_TIME_GRT returns
    a value of DATETIME_GRT = 0, this means that the floating point
    major frame datetime could not be determined from the minor frame 
    ground receipt datetime.  If the latter be true, procedure
    BFST_CALC_TIME_GRT will alert the analyst to this situation
    and proceed with reconstrution without filling the major frame 
    floating point datetime column in the conseq.

 For more details on this procedure see RECONSTRUCTION.txt.
OTHERS*/
