/*MAIN
 Overview

 TREND_GEN_RECIPE is a procedure that is invoked by Labview to generate a
    recipe during trending should there be a need to reconstruct major frames
    within a timespan.
MAIN*/

/*ARGUMENTS
  Arguments

  TREND_GEN_RECIPE takes no arguments.
ARGUMENTS*/

/*DEPENDENCIES
 Dependencies

 The following is the sub-procedure called by TREND_GEN_RECIPE:
   - TREND_GEN_RECIPE2.  This procedure querries table trend_time for the 
     major frames to be reconstructed and generates a recipe for each minor
     frames of a major frame.

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

/*VARIABLES
 Variables

 The followind are variables used in the procedure:
   - NMFINR (INTEGER).  The number of major frames in table recipe2.

   - LIM_QRANK1 (INTEGER).  The limit quality rank.

   - MAX_QRANK1 (INTEGER).  The maximum quality rank.

   - NUM_RECIPE (INTEGER).  The total number of entries in table recipe2.
VARIABLES*/

/*EXAMPLES
 Examples

 Here is a call to TREND_GEN_RECIPE

   BEGIN
       TREND_GEN_RECIPE;
   END;
   /

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.
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:
  - RECIPE2.  Contains the recipe generated by a trending session.

  - MNFLT1.  Contains pointers for all major frames' minor frame counters in 
    the range of 0 to 50.

  - MNFLT2.  Contains pointers for all major frames' minor frame counters in 
    the range of 51 to 100.

  - MNFLT3.  Contains pointers for all major frames' minor frame counters in 
    the range of 101 to 150.

  - MNFLT4.  Contains pointers for all major frames' minor frame counters in 
    the range of 151 to 200.

  - MNFLT5.  Contains pointers for all major frames' minor frame counters in 
    the range of 201 to 249.

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

/*OTHERS
 Others
 
 It should be noted that this procedure call on sub-procedure TREND_GEN_
    RECIPE2 five times, each time corresponding to a different minor frame
    pointer table (MNFLTx) and its associated range of minor frames.

 For more details on this procedure see the paragraph on TRENDING in file
 RECONSTRUCTION.txt.
OTHERS*/
