Sage-ST ä

Fixlib

Documentation

ClosedRepairAllRelations ClosedRepairRelation OpenedRepairAllRelations OpenedRepairRelation
ReFormat ReStructure STRClosedRepairAllRelations STRClosedRepairRelation
STROpenedRepairALLRelations STROpenedRepairRelation STRReformat STRRestructure
SetVariableBlocking




  procedure ReFormat
             (const relName    : array of char;
              const oldDFL     : array of char;
              const ShowStatus : boolean;
              var   Error      : cardinal); overload; stdcall;

  exports ReFormat (const relName    : array of char;
                    const oldDFL     : array of char;
                    const ShowStatus : boolean;
                    var   Error      : cardinal) name 'FixLib_ReFormat';

  //*
  //  ReFormat - Restructure the data base relation.
  //
  //
  //  This procedure restructures the data base relation from the
  //  old definition to the new one.  A new data file is made, the
  //  old one deleted and the new one renamed to the old. The new data
  //  file will then assume the version identifier of the new
  //  DFL.  The index file associated with the requested relation
  //  will be deleted and must be rebuilt using the 'ReBuildIndex'
  //  procedure from Sage.  The following sequence of procedures
  //  is an example of a restructure and rebuild.
  //
  //    ReFormat  ('MyRel', 'SAMPLE.DFL', True, error);
  //    OpenRelation ('MyRel', True);
  //    ReBuildIndex ('MyRel', True, DummyDupProc, NumDups);
  //
  //  Any new fields which appear will be cleared to nul.
  //
  //  CALLING SEQUENCE -
  //
  //    ReFormat (relName, oldDFL, ShowStatus, error);
  //
  //  ENTRY -
  //
  //    relName : array of char
  //      Name of relation to restructure.
  //
  //    oldDFL : array of char
  //      Name (including possible drive and directory) of old
  //      DFL file which has the same version number for the
  //      relation being restructured.  If a null string is
  //      used, the name of the currently opened DFL will
  //      be used.
  //
  //    ShowStatus : boolean
  //      True - Show status messages as the work is performed.
  //      False - Do NOT show messages as the work is performed.
  //
  //  EXIT -
  //
  //    error : cardinal
  //      Error status return.
  //




  procedure ReFormat
             (const relName    : string;
              const oldDFL     : string;
              const ShowStatus : boolean;
              var   Error      : cardinal); overload; stdcall;

  exports ReFormat (const relName    : string;
                    const oldDFL     : string;
                    const ShowStatus : boolean;
                    var   Error      : cardinal) name 'FixLib_STRReFormat';

  //*
  //  STRReFormat - See documentation of ReFormat.
  //




  procedure ReStructure
             (const relName    : array of char;
              const oldDFL     : array of char;
              const recordProc : FixProcType;
              const ShowStatus : boolean;
              var   Error      : cardinal); overload; stdcall;

  exports ReStructure (const relName    : array of char;
                       const oldDFL     : array of char;
                       const recordProc : FixProcType;
                       const ShowStatus : boolean;
                       var   Error      : cardinal) name 'FixLib_ReStructure';

  //*
  //  ReStructure - Restructure the data base relation.
  //
  //
  //  This procedure restructures the data base relation from the
  //  old definition to the new one.  A new data file is made, the
  //  old one deleted and the new one renamed to the old. The new data
  //  file will then assume the version identifier of the new
  //  DFL.  The index file associated with the requested relation
  //  will be deleted and must be rebuilt using the 'ReBuildIndex'
  //  procedure from Sage.  The following sequence of procedures
  //  is an example of a restructure and rebuild.
  //
  //    ReStructure  ('MyRel', 'SAMPLE.DFL', MyProc, True, error);
  //    OpenRelation ('MyRel', True);
  //    ReBuildIndex ('MyRel', True, DummyDupProc, NumDups);
  //
  //  This procedure provides the capability of execution of
  //  another procedure before each restructured record is written
  //  out.  This procedure (shown as 'recordProc') has access to
  //  record through the normal Sage get and put routines (GetFieldA,
  //  PutFieldA, etc.).
  //
  //  CALLING SEQUENCE -
  //
  //    ReStructure (relName, oldDFL, recordProc, ShowStatus, error);
  //
  //  ENTRY -
  //
  //    relName : array of char
  //      Name of relation to restructure.
  //
  //    oldDFL : array of char
  //      Name (including possible drive and directory) of old
  //      DFL file which has the same version number for the
  //      relation being restructured.  If a null string is
  //      used, the name of the currently opened DFL will
  //      be used.
  //
  //    recordProc : PROC
  //      This procedure is executed after each old record is
  //      read and before it is written out to the restructured
  //      data base.  It may be used to change or load data
  //      into the data base records using the standard SAGE
  //      routines for 'Get ..' and 'Put ..'.
  //
  //    ShowStatus : boolean
  //      True - Show status messages as the work is performed.
  //      False - Do NOT show messages as the work is performed.
  //
  //  EXIT -
  //
  //    error : cardinal
  //      Error status return.
  //




  procedure ReStructure
             (const relName    : string;
              const oldDFL     : string;
              const recordProc : FixProcType;
              const ShowStatus : boolean;
              var   Error      : cardinal); overload; stdcall;

  exports ReStructure (const relName    : string;
                       const oldDFL     : string;
                       const recordProc : FixProcType;
                       const ShowStatus : boolean;
                       var   Error      : cardinal) name 'FixLib_STRReStructure';

  //*
  //  STRReStructure - See documentation of ReStructure.
  //




  procedure SetVariableBlocking
             (const blocking : cardinal); stdcall;

  exports SetVariableBlocking name 'FixLib_SetVariableBlocking';

  //*
  //  SetVariableBlocking - Set the blocking factor for variable length data.
  //
  //
  //  This procedure change the blocking factor for the variable length
  //  data file used by the relation to be rebuilt.  If this is to
  //  be done, then this procedure must be called prior to each execution
  //  of ReFormat or ReStructure.  Otherwise, the blocking factor
  //  will remain the same as it was for the original block data file.
  //
  //  CALLING SEQUENCE -
  //
  //    SetVariableBlocking (blocking)
  //
  //  ENTRY -
  //
  //    blocking : cardinal
  //      The new blocking factor (30 .. n).  If you wish to reset to
  //          the original blocking factor, set this variable to zero (0).
  //          After each ReFormat or ReStructure execution, the blocking
  //          factor is automatically set to 0 to signal any subsequent
  //          ReFormat operations to use the original blocking factor.  If
  //          a relation's variable length file (block data file) was created
  //          using the standard default, it will have a blocking factor
  //          of 128.
  //




  procedure OpenedRepairRelation
             (const RelationName : array of char;
              const MultiUser    : boolean;
              const OldDflName   : array of char;
              const ShowStatus   : boolean;
              var   Repaired     : boolean;
              var   TotalDups    : cardinal;
              var   Success      : boolean); overload; stdcall;

  exports OpenedRepairRelation (const RelationName : array of char;
                                const MultiUser    : boolean;
                                const OldDflName   : array of char;
                                const ShowStatus   : boolean;
                                var   Repaired     : boolean;
                                var   TotalDups    : cardinal;
                                var   Success      : boolean) name 'FixLib_OpenedRepairRelation';

  //*
  //  OpenedRepairRelation - Check and rebuild single relation while Dfl is opened.
  //
  //
  //  While the DFL is already opened and the requested relation is closed this
  //  routine checks the relation to see if either a .DAT file restructure or a
  //  .IDX file reindex is needed.  If it is then the routine will try to perform
  //  the needed action.  If a restructure is needed the routine will use the name
  //  of the old dfl file that is passed in.  If that file does not match the version
  //  the routine will look for all possible matches first using the new method of
  //  naming old files (i.e. MyDfl.OLD, MyDfl.D02, MyDfl.D03, etc).  If it does not
  //  find a match during that search it tries the old method of naming just in case
  //  that file is still around (i.e. MyDfl.Old, MyDfl.OL2, MyDfl.OL3, etc).
  //
  //  CALLING SEQUENCE -
  //
  //    OpenedRepairRelation (RelationName, MultiUser, OldDflName, ShowStatus,
  //                          Repaired, TotalDups, Success)
  //
  //  ENTRY -
  //
  //    RelationName : array of char
  //      The name of the relation to check and rebuild if necessary.
  //
  //    MultiUser : boolean
  //      True - Use MultSage calls when working with the relation.
  //      False - Use Sage calls when working with the relation.
  //
  //    OldDflName : array of char
  //      The name of the .OLD dfl file.
  //
  //    ShowStatus : boolean
  //      True - Show messages during any rebuilding or reindexing.
  //      False - Don't show message during any rebuilding or reindexing.
  //
  //  EXIT -
  //
  //    Repaired : boolean
  //      True - The relation required a rebuild or reindex and was fixed.
  //      False - No rebuilding or reindexing needed for this relation.
  //
  //    TotalDups : cardinal
  //      The number of duplicate entries found while rebuilding a primary key
  //      in this relation.
  //
  //    Success : boolean
  //      True - The routine processed successfully.  If Repaired is also True then
  //             this flag indicates if that operation was successful.  If Repaired
  //             is False then this flag simply shows tha the routine ran and
  //             exited successfully.
  //      False - An error occured.  This could be that the file needed for a
  //      rebuild could not be located or some other error prevented the
  //      routine from completing the operation.
  //




  procedure OpenedRepairRelation
             (const RelationName : string;
              const MultiUser    : boolean;
              const OldDflName   : string;
              const ShowStatus   : boolean;
              var   Repaired     : boolean;
              var   TotalDups    : cardinal;
              var   Success      : boolean); overload; stdcall;

  exports OpenedRepairRelation (const RelationName : string;
                                const MultiUser    : boolean;
                                const OldDflName   : string;
                                const ShowStatus   : boolean;
                                var   Repaired     : boolean;
                                var   TotalDups    : cardinal;
                                var   Success      : boolean) name 'FixLib_STROpenedRepairRelation';

  //*
  //  STROpenedRepairRelation - See documentation of OpenedRepairRelation.
  //




  procedure OpenedRepairAllRelations
             (const MultiUser  : boolean;
              const OldDflName : array of char;
              const ShowStatus : boolean;
              var   Repaired   : boolean;
              var   Success    : boolean); overload; stdcall;

  exports OpenedRepairAllRelations (const MultiUser  : boolean;
                                    const OldDflName : array of char;
                                    const ShowStatus : boolean;
                                    var   Repaired   : boolean;
                                    var   Success    : boolean) name 'FixLib_OpenedRepairAllRelations';

  //*
  //  OpenedRepairAllRelations - Check and rebuild all relations while Dfl is opened.
  //
  //
  //  While the DFL is opened this routine checks cycles through all the relations
  //  and checks to see if either a .DAT file restructure or a .IDX file reindex is
  //  needed.  If it is then the routine will try to perform the needed action.  If
  //  a restructure is needed the routine will use the name of the old dfl file that
  //  is passed in.  If that file does not match the version the routine will look
  //  for all possible matches first using the new method of naming old files
  //  (i.e. MyDfl.OLD, MyDfl.D02, MyDfl.D03, etc).  If it does not find a match during
  //  that search it tries the old method of naming just in case that file is still
  //  around (i.e. MyDfl.Old, MyDfl.OL2, MyDfl.OL3, etc).
  //
  //  CALLING SEQUENCE -
  //
  //    OpenedRepairAllRelations (MultiUser, OldDflName, ShowStatus,
  //                              Repaired, Success)
  //
  //  ENTRY -
  //
  //    MultiUser : boolean
  //      True - Use MultSage calls when working with the relation.
  //      False - Use Sage calls when working with the relation.
  //
  //    OldDflName : array of char
  //      The name of the .OLD dfl file.
  //
  //    ShowStatus : boolean
  //      True - Show messages during any rebuilding or reindexing.
  //      False - Don't show message during any rebuilding or reindexing.
  //
  //  EXIT -
  //
  //    Repaired : boolean
  //      True - The relation required a rebuild or reindex and was fixed.
  //      False - No rebuilding or reindexing needed for this relation.
  //
  //    Success : boolean
  //      True - The routine processed successfully.  If Repaired is also True then
  //             this flag indicates if that operation was successful.  If Repaired
  //             is False then this flag simply shows tha the routine ran and
  //             exited successfully.
  //      False - An error occured.  This could be that the file needed for a
  //      rebuild could not be located or some other error prevented the
  //      routine from completing the operation.
  //




  procedure OpenedRepairAllRelations
             (const MultiUser  : boolean;
              const OldDflName : string;
              const ShowStatus : boolean;
              var   Repaired   : boolean;
              var   Success    : boolean); overload; stdcall;

  exports OpenedRepairAllRelations (const MultiUser  : boolean;
                                    const OldDflName : string;
                                    const ShowStatus : boolean;
                                    var   Repaired   : boolean;
                                    var   Success    : boolean) name 'FixLib_STROpenedRepairAllRelations';

  //*
  //  STROpenedRepairAllRelations - See documentation of OpenedRepairAllRelations.
  //




  procedure ClosedRepairRelation
             (const DflName      : array of char;
              const RelationName : array of char;
              const MultiUser    : boolean;
              const OldDflName   : array of char;
              const ShowStatus   : boolean;
              var   Repaired     : boolean;
              var   TotalDups    : cardinal;
              var   Success      : boolean); overload; stdcall;

  exports ClosedRepairRelation (const DflName      : array of char;
                                const RelationName : array of char;
                                const MultiUser    : boolean;
                                const OldDflName   : array of char;
                                const ShowStatus   : boolean;
                                var   Repaired     : boolean;
                                var   TotalDups    : cardinal;
                                var   Success      : boolean) name 'FixLib_ClosedRepairRelation';

  //*
  //  ClosedRepairRelation - Check and rebuild single relation while Dfl is closed.
  //
  //
  //  While the DFL is closed this routine checks a single relation to see if either
  //  a .DAT file restructure or a .IDX file reindex is needed.  If it is then the
  //  routine will try to perform the needed action.  If a restructure is needed the
  //  routine will use the name of the old dfl file that is passed in.  If that file
  //  does not match the version the routine will look for all possible matches first
  //  using the new method of naming old files (i.e. MyDfl.OLD, MyDfl.D02, MyDfl.D03,
  //  etc).  If it does not find a match during that search it tries the old method
  //  of naming just in case that file is still around (i.e. MyDfl.Old, MyDfl.OL2,
  //  MyDfl.OL3, etc).
  //
  //  CALLING SEQUENCE -
  //
  //    ClosedRepairRelation (DflName, RelationName, MultiUser, OldDflName, ShowStatus,
  //                          Repaired, TotalDups, Success)
  //
  //  ENTRY -
  //
  //    DflName : array of char
  //      The name of the Dfl file whose relations are to be checked.
  //
  //    RelationName : array of char
  //      The name of the relation to check and rebuild if necessary.
  //
  //    MultiUser : boolean
  //      True - Use MultSage calls when working with the relation.
  //      False - Use Sage calls when working with the relation.
  //
  //    OldDflName : array of char
  //      The name of the .OLD dfl file.
  //
  //    ShowStatus : boolean
  //      True - Show messages during any rebuilding or reindexing.
  //      False - Don't show message during any rebuilding or reindexing.
  //
  //  EXIT -
  //
  //    Repaired : boolean
  //      True - The relation required a rebuild or reindex and was fixed.
  //      False - No rebuilding or reindexing needed for this relation.
  //
  //    TotalDups : cardinal
  //      The number of duplicate entries found while rebuilding a primary key
  //      in this relation.
  //
  //    Success : boolean
  //      True - The routine processed successfully.  If Repaired is also True then
  //             this flag indicates if that operation was successful.  If Repaired
  //             is False then this flag simply shows tha the routine ran and
  //             exited successfully.
  //      False - An error occured.  This could be that the file needed for a
  //      rebuild could not be located or some other error prevented the
  //      routine from completing the operation.
  //




  procedure ClosedRepairRelation
             (const DflName      : string;
              const RelationName : string;
              const MultiUser    : boolean;
              const OldDflName   : string;
              const ShowStatus   : boolean;
              var   Repaired     : boolean;
              var   TotalDups    : cardinal;
              var   Success      : boolean); overload; stdcall;

  exports ClosedRepairRelation (const DflName      : string;
                                const RelationName : string;
                                const MultiUser    : boolean;
                                const OldDflName   : string;
                                const ShowStatus   : boolean;
                                var   Repaired     : boolean;
                                var   TotalDups    : cardinal;
                                var   Success      : boolean) name 'FixLib_STRClosedRepairRelation';

  //*
  //  STRClosedRepairRelation - See documentation of CLosedRepairRelation.
  //




  procedure ClosedRepairAllRelations
             (const DflName    : array of char;
              const MultiUser  : boolean;
              const OldDflName : array of char;
              const ShowStatus : boolean;
              var   Repaired   : boolean;
              var   Success    : boolean); overload; stdcall;

  exports ClosedRepairAllRelations (const DflName    : array of char;
                                    const MultiUser  : boolean;
                                    const OldDflName : array of char;
                                    const ShowStatus : boolean;
                                    var   Repaired   : boolean;
                                    var   Success    : boolean) name 'FixLib_ClosedRepairAllRelations';

  //*
  //  ClosedRepairAllRelations - Check and rebuild all relations while Dfl is closed.
  //
  //
  //  While the DFL is closed this routine checks cycles through all the relations
  //  and checks to see if either a .DAT file restructure or a .IDX file reindex is
  //  needed.  If it is then the routine will try to perform the needed action.  If
  //  a restructure is needed the routine will use the name of the old dfl file that
  //  is passed in.  If that file does not match the version the routine will look
  //  for all possible matches first using the new method of naming old files
  //  (i.e. MyDfl.OLD, MyDfl.D02, MyDfl.D03, etc).  If it does not find a match during
  //  that search it tries the old method of naming just in case that file is still
  //  around (i.e. MyDfl.Old, MyDfl.OL2, MyDfl.OL3, etc).
  //
  //  CALLING SEQUENCE -
  //
  //    ClosedRepairAllRelations (DflName, MultiUser, OldDflName, ShowStatus,
  //                              Repaired, Success)
  //
  //  ENTRY -
  //
  //    DflName : array of char
  //      The name of the Dfl file whose relations are to be checked.
  //
  //    MultiUser : boolean
  //      True - Use MultSage calls when working with the relation.
  //      False - Use Sage calls when working with the relation.
  //
  //    OldDflName : array of char
  //      The name of the .OLD dfl file.
  //
  //    ShowStatus : boolean
  //      True - Show messages during any rebuilding or reindexing.
  //      False - Don't show message during any rebuilding or reindexing.
  //
  //  EXIT -
  //
  //    Repaired : boolean
  //      True - The relation required a rebuild or reindex and was fixed.
  //      False - No rebuilding or reindexing needed for this relation.
  //
  //    Success : boolean
  //      True - The routine processed successfully.  If Repaired is also True then
  //             this flag indicates if that operation was successful.  If Repaired
  //             is False then this flag simply shows tha the routine ran and
  //             exited successfully.
  //      False - An error occured.  This could be that the file needed for a
  //      rebuild could not be located or some other error prevented the
  //      routine from completing the operation.
  //




  procedure ClosedRepairAllRelations
             (const DflName    : string;
              const MultiUser  : boolean;
              const OldDflName : string;
              const ShowStatus : boolean;
              var   Repaired   : boolean;
              var   Success    : boolean); overload; stdcall;

  exports ClosedRepairAllRelations (const DflName    : string;
                                    const MultiUser  : boolean;
                                    const OldDflName : string;
                                    const ShowStatus : boolean;
                                    var   Repaired   : boolean;
                                    var   Success    : boolean) name 'FixLib_STRClosedRepairAllRelations';

  //*
  //  STRClosedRepairAllRelations - Check and rebuild all relations while Dfl is closed.
  //




Send mail to   warren.merrill@inl.gov with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance