/*MAIN
 Overview
 
 BFST_SET_MNFSKIP is a sub-procedure of the main reconstruction procedure 
    RECONSTRUCTION1.  This procedure takes care of setting the minor frame skip
    in the BFST where it should be set.  Note that Assemly/Decommmution originally
    sets the skip whenever a minor frame counter is not monotonically incrementing
    or decrementing when it should.  Besides the latter and for the purposes of
    conseq analysis, procedure BFST_SET_MNFSKIP additionnally sets the minor frame
    skip for all mission when a new continuity begins in the data (indicated by the
    DISC column in the BFST).  For the PWIW mission, procedure BFST_SET_MNFSKIP
    additionally sets the skip when the HRPSKIP is set.  At the end of this proce-
    dure's execution, conseqs in the BFST are bounded by minor frame skip flags
    being raised (MNFSKIP = 1).
MAIN*/

/*ARGUMENTS
  Arguments
 
  BFST_SET_MNFSKIP takes the following argument, which has an IN 
  parameter mode:
   - BFST (VARCHAR2).  This variable represents the name of the bad Frames 
     Statistics Table that was posted by Labview just prior to the onset of 
     reconstruction.  Entries in the BFST were built and logged into a script
     file during processing of the annotated minor frames file by AD.
ARGUMENTS*/

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

   - RULES_STATES.  This is a package of three procedures and one function all
     of which track and post reconstruction states for all rules as they become
     available, in the temporary table LOGT.

   - RULE.  This is the stored package that manipulates the reconstruction rules
     numbers, name and version number.

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

   - CONFIG.  This is the stored package that manipulates the configuration
     parameters for all the reconstruction rules.

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

   - POST_STATE.  This is a package of three procedures and one function all
     of which serve the role of writing the states of all rules as they become
     available, in the system_state table.
DEPENDENCIES*/

/*VARIABLES
 Variables

 The following are variables used in the procedure:
   - D (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 BFST_SET_MNFSKIP:
 
   BEGIN
       BFST_SET_MNFSKIP ('GEOTAIL1997274142242671BAD');
   END;
   /

 The arguments of this procedure are passed in from Assembly/Decommutation. 
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 tables are referenced in this procedure:
  - BFST. This is the Bad Frame statistics Table that was posted by AD
    just prior to the onset of reconstruction.

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

/*OTHERS
 Others
 
 It should be noted that after a skip is set (MNFSKIP = 1) the skip flag goes back
   to 0 (MNFSKIP = 0), therefore a skip of 0 means this minor frame is monotonically
   incrementing or decrementing, and skip of 1 means the minor frame is not
   monotonically incrementing or decrementing.

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