Sage-ST ä

Infolib

Documentation

CharacterIsValid CurrentFieldInfo CurrentFormInfo DefineKeyExitRange
FieldBlank FieldEmpty GetDFLVersion GetDes
GetFieldDes GetJoins GetMasterView GetRecordDes
GetViewFields GetViewNames GetViewRelations LastCursorField
LastExitChar RelationViewInfo STRFieldBlank STRFieldEmpty
STRGetDes STRGetRecordDes STRLastCursorField STRSTRShowFieldInfo
STRShowConcatInfo STRShowFieldEnumeration STRShowFieldInfo STRShowFormFieldColor
STRShowRecordFlags STRShowRecordInfo STRValidateField ShowConcatInfo
ShowField ShowFieldEnumeration ShowFieldInfo ShowFileInfo
ShowFormFieldColor ShowFormFieldInfo ShowFormInfo ShowRecordFlags
ShowRecordInfo SystemModNumber TotalJoins TotalRelations
TotalViewFields TotalViewRelations TotalViews ValidateField




  procedure DefineKeyExitRange
             (const startOfRange : char;
              const endOfRange   : char); stdcall;

  exports DefineKeyExitRange name 'InfoLib_DefineKeyExitRange';




  function LastExitChar
             () : char; stdcall;

  exports LastExitChar name 'InfoLib_LastExitChar';




  procedure LastCursorField
             (const FormName  : array of char;
              var   relName   : array of char;
              var   fieldName : array of char;
              var   FldRepeat : cardinal;
              var   Error     : cardinal); overload; stdcall;

  exports LastCursorField (const FormName  : array of char;
                           var   relName   : array of char;
                           var   fieldName : array of char;
                           var   FldRepeat : cardinal;
                           var   Error     : cardinal) name 'InfoLib_LastCursorField';

  //*
  //  LastCursorField - Return the last field the cursor was in.
  //
  //
  //  This procedure returns the last field in the requested form
  //  in which the cursor was located.  This procedure should be
  //  called immediately following the display and return from the
  //  form, otherwise, the saved cursor location may be lost as
  //  subsequent forms are displayed.
  //
  //  CALLING SEQUENCE -
  //
  //    LastCursorField (formName, relName, fieldName, repeat, error)
  //
  //  ENTRY -
  //
  //    formName : array of char
  //      The name of the form
  //
  //  EXIT -
  //
  //    relName : array of char
  //      The relation name of the associated field.
  //
  //    fieldName : array of char
  //      The field name in which the cursor was located.  This
  //      will be a nul array if the results could not be found
  //
  //    repeat : cardinal
  //      The repeat value for the field.
  //
  //    error : cardinal
  //      Sage error status return (0=ok).
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo1;
  //
  //     --  Assume that you need to know what the last field
  //     --  you were in on a form so that you could return to
  //     --  that same place on the form later on.  This demo
  //     --  will give you the last field the cursor was on.
  //
  //
  //    IMPORT InfoLib;
  //
  //
  //    var
  //
  //      returnfieldname : array [0 .. 7] of char;
  //      returnrelation  : array [0 .. 7] of char;
  //
  //      fieldrepeat     : cardinal;
  //      errorvalue      : cardinal;
  //
  //
  //    begin
  //      -- We assume that OpenSystem has already been called
  //      --   and that a 'DisplayForm' or similar MODULE call
  //      --   has been called just before this statement.
  //      --   We also assume that 'STUDENT' is the form that was
  //      --   last displayed.
  //
  //      LastCursorField ('STUDENT',
  //                       returnrelation,
  //                       returnfieldname,
  //                       fieldrepeat,
  //                       errorvalue);
  //
  //    end;  // InDemo1.
  //




  procedure LastCursorField
             (const FormName  : string;
              var   relName   : array of char;
              var   fieldName : array of char;
              var   FldRepeat : cardinal;
              var   Error     : cardinal); overload; stdcall;

  exports LastCursorField (const FormName  : string;
                           var   relName   : array of char;
                           var   fieldName : array of char;
                           var   FldRepeat : cardinal;
                           var   Error     : cardinal) name 'InfoLib_STRLastCursorField';

  //*
  //  STRLastCursorField - See documentation of LastCursorField.
  //




  procedure CurrentFieldInfo
             (var   currentRecord : array of char;
              var   currentField  : array of char;
              var   currentRepeat : cardinal); stdcall;

  exports CurrentFieldInfo name 'InfoLib_CurrentFieldInfo';

  //*
  //  CurrentFieldInfo - Return the current field status information.
  //
  //
  //  This procedure returns the information concerning the
  //  current record and field.  This may be the field in which the
  //  cursor resides on a form, and, if not in a form, the current
  //  or last referenced field of a record.  If in 'DefineFieldCheck',
  //  it is the record and field which is being checked.
  //
  //  CALLING SEQUENCE -
  //
  //    CurrentFieldInfo (currentRecord, currentField, currentRepeat)
  //
  //  EXIT -
  //
  //    currentRecord : array of char
  //      The name of the current record.
  //
  //    currentField : array of char
  //      The name of the current record field.
  //
  //    currentRepeat : cardinal
  //      The repeat value of the current field (1 .. n).
  //




  procedure CurrentFormInfo
             (var   currentForm   : array of char;
              var   currentRecord : array of char;
              var   currentField  : array of char;
              var   currentRepeat : cardinal;
              var   tabOrder      : cardinal); stdcall;

  exports CurrentFormInfo name 'InfoLib_CurrentFormInfo';

  //*
  //  CurrentFormInfo - Return the current form status information.
  //
  //
  //  This procedure returns the current information concerning the
  //  current form.  If not in a form, it returns the information
  //  concerning the last form called.  This information is useful
  //  for such functions as the 'DefinedFieldCheck' for checking
  //  valid field values, and for the 'DisplayFormV' type calls.
  //
  //  CALLING SEQUENCE -
  //
  //    CurrentFormInfo (currentForm, currentRecord, currentField,
  //                     currentRepeat)
  //
  //  EXIT -
  //
  //    current : array of char
  //      The current form in which the cursor resides.
  //
  //    currentRecord : array of char
  //      The name of the record of the field on the form in
  //      which the cursor currently resides
  //
  //    currentField : array of char
  //      The name of the record field associated with the field
  //      on the form in which the cursor currently resides.
  //
  //    currentRepeat : cardinal
  //      The repeat value of the current field (1 .. n).
  //
  //    tabOrder : cardinal
  //      The tab order (1 .. n) or the indicated field within the form.
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo2;
  //
  //      -- Assume that we are in Checklib.  This Demo
  //      -- will return the current form information
  //      -- so that you can check various fields.
  //      -- (see Checklib).
  //
  //
  //    IMPORT InfoLib;
  //
  //
  //    var
  //
  //      returnfieldname : array [0 .. 7] of char;
  //      returnrelation  : array [0 .. 7] of char;
  //      returnform      : array [0 .. 7] of char;
  //
  //      fieldrepeat     : cardinal;
  //      tabOrder        : cardinal;
  //      errorvalue      : cardinal;
  //
  //    begin
  //      -- We assume that OpenSystem has already been called
  //      -- and that a 'DisplayForm' or similar MODULE call
  //      -- has been called just before this statement.
  //      -- We also assume that this code is in Checklib.adb.
  //
  //
  //      CurrentFormInfo (returnform,
  //                       returnrelation,
  //                       returnfieldname,
  //                       fieldrepea);
  //                       tabOrder);
  //
  //      -- Continue on with other Checklib items.
  //    end;  // InDemo2.
  //




  procedure GetDFLVersion
             (var   Indicator1 : cardinal;
              var   Indicator2 : cardinal;
              var   Indicator3 : cardinal); stdcall;

  exports GetDFLVersion name 'InfoLib_GetDFLVersion';

  //*
  //  GetDFLVersion - Retreive the version ids for the current DFL.
  //
  //
  //  This procedure returns the version ids for the current DFL file.
  //
  //  CALLING SEQUENCE -
  //
  //    GetDFLVersion (Indicator1, Indicator2, Indicator3);
  //
  //  ENTRY -
  //
  //  EXIT -
  //
  //    Indicator1 : cardinal
  //      First version id.
  //
  //    Indicator2 : cardinal
  //      Second version id.
  //
  //    Indicator3 : cardinal
  //      Third version id.
  //




  function SystemModNumber
             () : cardinal; stdcall;

  exports SystemModNumber name 'InfoLib_SystemModNumber';

  //*
  //  SystemModNumber - Retreive the system modification number.
  //
  //  This is the number that controls access to DFL versions.
  //  For instance you can't open a version 2 DFL with the
  //  current libraries since they have advanced beyond that
  //  point.
  //
  //
  //  This procedure returns the system modification number.
  //
  //  CALLING SEQUENCE -
  //
  //    ModNumber := SystemModNumber ();
  //
  //  ENTRY -
  //
  //  EXIT -
  //
  //    SysModNumber : cardinal
  //      The system modification number.
  //




  function TotalRelations
             () : cardinal; stdcall;

  exports TotalRelations name 'InfoLib_TotalRelations';

  //*
  //  TotalRelations - Retreive the number of relations for the current system.
  //
  //
  //  This procedure returns the number of relations for the
  //  currently opened system.
  //
  //  CALLING SEQUENCE -
  //
  //    NumRels := TotalRelations ();
  //
  //  EXIT -
  //
  //    TotalRelations : cardinal
  //      Number of relations belonging to the current system.
  //




  procedure ShowRecordInfo
             (const recordNumber : cardinal;
              var   recordName   : array of char;
              var   fileNumber   : cardinal;
              var   FieldTotal   : cardinal;
              var   recordSize   : cardinal;
              var   Version      : TimeDate.Time;
              var   Error        : cardinal); overload; stdcall;

  exports ShowRecordInfo (const recordNumber : cardinal;
                          var   recordName   : array of char;
                          var   fileNumber   : cardinal;
                          var   FieldTotal   : cardinal;
                          var   recordSize   : cardinal;
                          var   Version      : TimeDate.Time;
                          var   Error        : cardinal) name 'InfoLib_ShowRecordInfo';

  //*
  //  ShowRecordInfo - Retreive and show record information.
  //
  //
  //  This procedure retrieves information about the specified
  //  record and returns it.  Either the record number or the
  //  record name may be used.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowRecordInfo (recordNumber, recordName, fileNumber,
  //                    fieldTotal, recordSize, Version, error)
  //
  //  ENTRY -
  //
  //    recordNumber : cardinal
  //      The number of the record (1 .. n) to be located.  If this
  //      value is set to 0 (zero), then the 'recordName' is used
  //      instead to locate the requested record.
  //
  //    recordName : array of char
  //      The name of the record to be located (if 'recordNumber'
  //      is set to 0 (zero)).
  //
  //  EXIT -
  //
  //    recordName : array of char
  //      The name of the record.
  //
  //    fileNumber : cardinal
  //      The number of the file associated with the relation or
  //      0 if a memory record.
  //
  //    fieldTotal : cardinal
  //      The number of fields in the record.
  //
  //    recordSize : cardinal
  //      The actual byte size of the record.
  //
  //    Version : TimeDate.Time
  //      The version of the relation.  Can be converted to usable format
  //      with TimeLib.ClockToTime1.
  //
  //    error : cardinal
  //      Sage error return (0 if ok).
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo3;
  //
  //      Suppose that we need to know if any fields are
  //      concatenated within the relation (record)
  //      'DEMOREL2' and what fields are concatenated.
  //      We will first use ShowRecordInfo to find out
  //      how many fields are in the relation.  Next we
  //      use ShowFieldInfo to get the fields' name and
  //      to see if the fieldType is 0 (concatenated.
  //      With the name of the concatenated field we
  //      call ShowConcatInfo to see which fields are
  //      used for concatenation.
  //
  //
  //    IMPORT Display;
  //    IMPORT InfoLib;
  //                            ShowFieldInfo,
  //                            ShowConcatInfo,
  //                            InfoName;
  //
  //
  //    var
  //
  //       returnRecord     : array [0 .. 7] of char;
  //       returnFieldName  : array [0 .. 7] of char;
  //
  //       sizeOfRecord     : cardinal;
  //       numFields        : cardinal;
  //       errorValue       : cardinal;
  //
  //       fieldNumb        : cardinal;
  //       typeOfField      : cardinal;
  //       fieldAlphaLength : cardinal;
  //       fieldDefLength   : cardinal;
  //       numDecDigits     : cardinal;
  //       subtype          : cardinal;
  //       numRepeats       : cardinal;
  //       totalConcat      : cardinal;
  //
  //       keyValue         : char;
  //
  //
  //       concatFields     : array [0 .. 4] of InfoName;
  //
  //
  //    begin
  //      Assume that OpenSystem has been called and that
  //      the record 'DEMOREL2' is in the DFL.
  //
  //       returnRecord := 'DEMOREL2';
  //
  //       ShowRecordInfo (0,
  //                       returnRecord,
  //                       numFields,
  //                       sizeOfRecord,
  //                       errorValue);
  //
  //       fieldNumb := 1;
  //
  //       LOOP
  //         if fieldNumb = numFields then begin
  //           break;
  //         end;
  //
  //         ShowFieldInfo (returnRecord,
  //                        fieldNumb,
  //                        returnFieldName,
  //                        typeOfField,
  //                        fieldAlphaLength,
  //                        fieldDefLength,
  //                        numDecDigits,
  //                        subtype,
  //                        numRepeats,
  //                        keyValue,
  //                        errorValue);
  //
  //         if typeOfField = 0 then  -- concatenated field --
  //           ShowConcatInfo (returnRecord,
  //                           0,
  //                           returnFieldName,
  //                           concatFields,
  //                           totalConcat,
  //                           errorValue);
  //
  //           DisplayMessage ('Concat Field found.', True );
  //
  //           break;
  //         end;
  //
  //         fieldNumb := fieldNumb + 1;
  //       end;
  //
  //    end;  // InDemo3.
  //




  procedure ShowRecordInfo
             (const recordNumber : cardinal;
              var   recordName   : string;
              var   fileNumber   : cardinal;
              var   FieldTotal   : cardinal;
              var   recordSize   : cardinal;
              var   Version      : TimeDate.Time;
              var   Error        : cardinal); overload; stdcall;

  exports ShowRecordInfo (const recordNumber : cardinal;
                          var   recordName   : string;
                          var   fileNumber   : cardinal;
                          var   FieldTotal   : cardinal;
                          var   recordSize   : cardinal;
                          var   Version      : TimeDate.Time;
                          var   Error        : cardinal) name 'InfoLib_STRShowRecordInfo';

  //*
  //  STRShowRecordInfo - See documentation of ShowRecordInfo.
  //




  procedure ShowRecordFlags
             (const recordNumber : cardinal;
              var   recordName   : array of char;
              var   RecFlags     : cardinal;
              var   Error        : cardinal); overload; stdcall;

  exports ShowRecordFlags (const recordNumber : cardinal;
                           var   recordName   : array of char;
                           var   RecFlags     : cardinal;
                           var   Error        : cardinal) name 'InfoLib_ShowRecordFlags';

  //*
  //  ShowRecordFlags - Retrieve the records internal flags.
  //
  //
  //  This procedure retrieves information about the specified
  //  record, specifically the set of internal flags.  Either
  //  the record number or the record name may be used.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowRecordFlags (recordNumber, recordName, RecFlags,
  //                     Error)
  //
  //  ENTRY -
  //
  //    recordNumber : cardinal
  //      The number of the record (1 .. n) to be located.  If this
  //      value is set to 0 (zero), then the 'recordName' is used
  //      instead to locate the requested record.
  //
  //    recordName : array of char
  //      The name of the record to be located (if 'recordNumber'
  //      is set to 0 (zero)).
  //
  //  EXIT -
  //
  //    RecFlags : cardinal
  //      The internal flags for this record.
  //




  procedure ShowRecordFlags
             (const recordNumber : cardinal;
              var   recordName   : string;
              var   RecFlags     : cardinal;
              var   Error        : cardinal); overload; stdcall;

  exports ShowRecordFlags (const recordNumber : cardinal;
                           var   recordName   : string;
                           var   RecFlags     : cardinal;
                           var   Error        : cardinal) name 'InfoLib_STRShowRecordFlags';

  //*
  //  STRShowRecordFlags - See documentation of ShowRecordFlags.
  //




  procedure ShowField
             (const systemNumber  : cardinal;
              const recordNumber  : cardinal;
              const fieldNumber   : cardinal;
              var   fieldName     : array of char;
              var   fieldType     : cardinal;
              var   alphaLength   : cardinal;
              var   definedLength : cardinal;
              var   decimalDigits : cardinal;
              var   fieldSubType  : cardinal;
              var   repeatTotal   : cardinal;
              var   KeyTypeChar   : char;
              var   Error         : cardinal); stdcall;

  exports ShowField name 'InfoLib_ShowField';




  procedure ShowFieldInfo
             (const recordName    : array of char;
              const fieldNumber   : cardinal;
              var   fieldName     : array of char;
              var   fieldType     : cardinal;
              var   alphaLength   : cardinal;
              var   definedLength : cardinal;
              var   decimalDigits : cardinal;
              var   fieldSubType  : cardinal;
              var   repeatTotal   : cardinal;
              var   KeyTypeChar   : char;
              var   Error         : cardinal); overload; stdcall;

  exports ShowFieldInfo (const recordName    : array of char;
                         const fieldNumber   : cardinal;
                         var   fieldName     : array of char;
                         var   fieldType     : cardinal;
                         var   alphaLength   : cardinal;
                         var   definedLength : cardinal;
                         var   decimalDigits : cardinal;
                         var   fieldSubType  : cardinal;
                         var   repeatTotal   : cardinal;
                         var   KeyTypeChar   : char;
                         var   Error         : cardinal) name 'InfoLib_ShowFieldInfo';

  //*
  //  ShowFieldInfo - Show information about the requested field.
  //
  //
  //  This procedure displays information about the requested field
  //  if it exists.  Either the field number or the field name may
  //  be used to reference the field.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowFieldInfo (recordName, fieldNumber, fieldName, fieldType,
  //                   definedLength, decimalDigits, fieldSubType,
  //                   alphaLength, repeatTotal, keyType, error)
  //
  //  ENTRY -
  //
  //    recordName : array of char
  //      Name of relation to which the field belongs.
  //
  //    fieldNumber : cardinal
  //      The number of the field (1 .. n) to be located.  If this
  //          value is set to 0 (zero), the the 'fieldName' is used
  //      instead.
  //
  //    fieldName : array of char
  //      The name of the field to be located (if 'fieldNumber' is
  //      set to 0 (zero)).
  //
  //  EXIT -
  //
  //    fieldName : array of char
  //      The name of the field if it exists.
  //
  //    fieldType : cardinal
  //      The type of the field.
  //
  //    alphaLength : cardinal
  //      The length of the field as it is displayed on the form
  //      or returned as an alpha value.
  //
  //    definedLength : cardinal
  //      The user defined length of the field.  This is the length
  //      specified in the Thor editor during schema definition.
  //      This length may not be the same as the alphaLength since
  //      fields such as scientific notation fields display longer
  //      than their defined length.
  //
  //    decimalDigits : cardinal
  //      The number of digits to the right of the decimal.  This
  //      is only valid if the field is one of the real number type
  //      fields (real, sci. notation, money).
  //
  //    fieldSubType : cardinal
  //      Field subtype.
  //
  //    repeatTotal : cardinal
  //      The number of repeat values defined for the field.
  //
  //    keyType : char
  //      The key type of the field ('P'=primary, 'A'=alternate,
  //      'N'=non-keyed).
  //
  //    error : cardinal
  //      Sage error return (0 if ok).
  //




  procedure ShowFieldInfo
             (const recordName    : string;
              const fieldNumber   : cardinal;
              var   fieldName     : array of char;
              var   fieldType     : cardinal;
              var   alphaLength   : cardinal;
              var   definedLength : cardinal;
              var   decimalDigits : cardinal;
              var   fieldSubType  : cardinal;
              var   repeatTotal   : cardinal;
              var   KeyTypeChar   : char;
              var   Error         : cardinal); overload; stdcall;

  exports ShowFieldInfo (const recordName    : string;
                         const fieldNumber   : cardinal;
                         var   fieldName     : array of char;
                         var   fieldType     : cardinal;
                         var   alphaLength   : cardinal;
                         var   definedLength : cardinal;
                         var   decimalDigits : cardinal;
                         var   fieldSubType  : cardinal;
                         var   repeatTotal   : cardinal;
                         var   KeyTypeChar   : char;
                         var   Error         : cardinal) name 'InfoLib_STRShowFieldInfo';

  //*
  //  STRShowFieldInfo - See documentation of ShowFieldInfo.
  //




  procedure ShowFieldInfo
             (const recordName    : string;
              const fieldNumber   : cardinal;
              var   fieldName     : string;
              var   fieldType     : cardinal;
              var   alphaLength   : cardinal;
              var   definedLength : cardinal;
              var   decimalDigits : cardinal;
              var   fieldSubType  : cardinal;
              var   repeatTotal   : cardinal;
              var   KeyTypeChar   : char;
              var   Error         : cardinal); overload; stdcall;

  exports ShowFieldInfo (const recordName    : string;
                         const fieldNumber   : cardinal;
                         var   fieldName     : string;
                         var   fieldType     : cardinal;
                         var   alphaLength   : cardinal;
                         var   definedLength : cardinal;
                         var   decimalDigits : cardinal;
                         var   fieldSubType  : cardinal;
                         var   repeatTotal   : cardinal;
                         var   KeyTypeChar   : char;
                         var   Error         : cardinal) name 'InfoLib_STRSTRShowFieldInfo';

  //*
  //  STRSTRShowFieldInfo - See documentation of ShowFieldInfo.
  //




  procedure ShowConcatInfo
             (const recordName   : array of char;
              const fieldNumber  : cardinal;
              var   fieldName    : array of char;
              var   concatFields : array of InfoName;
              var   concatTotal  : cardinal;
              var   Error        : cardinal); overload; stdcall;

  exports ShowConcatInfo (const recordName   : array of char;
                          const fieldNumber  : cardinal;
                          var   fieldName    : array of char;
                          var   concatFields : array of InfoName;
                          var   concatTotal  : cardinal;
                          var   Error        : cardinal) name 'InfoLib_ShowConcatInfo';

  //*
  //  ShowConcatInfo - Return sub-fields of a concatenated field.
  //
  //
  //  This procedure returns the subfields of a concatenated field.
  //  If the field is not a concatenated field or has not subfields,
  //  the 'concatTotal' is returned with a zero (0).
  //
  //  ENTRY -
  //
  //    recordName : array of char
  //      Name of relation to which the field belongs.
  //
  //    fieldNumber : cardinal
  //      The number of the field (1 .. n) to be located.  If this
  //      value is set to 0 (zero), the the 'fieldName' is used
  //      instead.
  //
  //    fieldName : array of char
  //      The name of the field to be located (if 'fieldNumber' is
  //      set to 0 (zero)).
  //
  //  EXIT -
  //
  //    fieldName : array of char
  //      The name of the field.
  //
  //    concatFields : array of InfoName
  //      Array of 8 character field names.
  //
  //    ConcatTotal : cardinal
  //      Number of names returned in 'concatFields'.
  //
  //    error : cardinal
  //      Sage error return (0 if ok).
  //
  //  EXAMPLE -
  //
  //    SEE ShowRecordInfo.
  //




  procedure ShowConcatInfo
             (const recordName   : string;
              const fieldNumber  : cardinal;
              var   fieldName    : string;
              var   concatFields : array of InfoName;
              var   concatTotal  : cardinal;
              var   Error        : cardinal); overload; stdcall;

  exports ShowConcatInfo (const recordName   : string;
                          const fieldNumber  : cardinal;
                          var   fieldName    : string;
                          var   concatFields : array of InfoName;
                          var   concatTotal  : cardinal;
                          var   Error        : cardinal) name 'InfoLib_STRShowConcatInfo';

  //*
  //  STRShowConcatInfo - See documentation of ShowConcatInfo.
  //




  procedure ShowFieldEnumeration
             (const recordName  : array of char;
              const fieldName   : array of char;
              const valueNumber : cardinal;
              var   eValue      : array of char;
              var   totalValues : cardinal;
              var   Error       : cardinal); overload; stdcall;

  exports ShowFieldEnumeration (const recordName  : array of char;
                                const fieldName   : array of char;
                                const valueNumber : cardinal;
                                var   eValue      : array of char;
                                var   totalValues : cardinal;
                                var   Error       : cardinal) name 'InfoLib_ShowFieldEnumeration';

  //*
  //  ShowFieldEnumeration - Return enumeration value for field.
  //
  //
  //  This procedure returns the specified enumeration values for the
  //  field if it exists.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowFieldEnumeration (recordName, fieldName, valueNumber,
  //                          eValue, totalValues, error)
  //
  //  ENTRY -
  //
  //    recordName : array of char
  //      Name of relation to which the field belongs.
  //
  //    fieldName : array of char
  //      The name of the field.
  //
  //    valueNumber : cardinal
  //      The enumeration value number (1 .. n).
  //
  //  EXIT -
  //
  //    eValue : array of char
  //      The enumeration value, if it exists
  //
  //    totalValues : cardinal
  //      The total number of enumeration values for the
  //      field (0 .. n).
  //
  //    error : cardinal
  //      Sage error return (0 if ok).  This value will be
  //      set to zero if the field exists but no enumeration
  //      values exists.  In this case, the 'totalValues' will
  //      be set to zero as well.
  //




  procedure ShowFieldEnumeration
             (const recordName  : string;
              const fieldName   : string;
              const valueNumber : cardinal;
              var   eValue      : array of char;
              var   totalValues : cardinal;
              var   Error       : cardinal); overload; stdcall;

  exports ShowFieldEnumeration (const recordName  : string;
                                const fieldName   : string;
                                const valueNumber : cardinal;
                                var   eValue      : array of char;
                                var   totalValues : cardinal;
                                var   Error       : cardinal) name 'InfoLib_STRShowFieldEnumeration';

  //*
  //  STRShowFieldEnumeration - Return enumeration value for field.
  //




  procedure ShowFileInfo
             (const fileNumber : cardinal;
              var   dataFile   : array of char;
              var   indexFile  : array of char;
              var   blockFile  : array of char;
              var   maxRecords : cardinal;
              var   Error      : cardinal); stdcall;

  exports ShowFileInfo name 'InfoLib_ShowFileInfo';

  //*
  //  ShowFileInfo - Show the names associated with the given number.
  //
  //
  //  This procedure returns the file names associated with the
  //  given file set number, 'fileNumber'.  These will be the names
  //  as defined within the data dictionary (.DFL) file.  If any other
  //  path has been defined from the CONFIGUR system or the
  //  'Sage.ResetRelationPath', it may also be retrieved using
  //  the 'Sage.GetRelationPath' procedure.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowFileInfo (fileNumber, dataFile, indexFile, blockFile,
  //                  maxRecords, error)
  //
  //  ENTRY -
  //
  //    fileNumber : cardinal
  //      The file set number.
  //
  //  EXIT -
  //
  //    dataFile : array of char
  //      The name of the data file and path and defined in the
  //      current data dictionary file (.DFL file).
  //
  //    indexFile : array of char
  //      The name of the index file and path and defined in the
  //      current data dictionary file (.DFL file).
  //
  //    blockFile : array of char
  //      The name of the block file and path and defined in the
  //      current data dictionary file (.DFL file).
  //
  //    maxRecords : cardinal
  //      The maximum number of records allowed in the relation.
  //
  //    error : cardinal
  //      Sage error return (0 if ok).
  //




  procedure ShowFormFieldColor
             (const FormName       : array of char;
              const fieldNumber    : cardinal;
              var   normalColor    : cardinal;
              var   highlightColor : cardinal;
              var   Error          : cardinal); overload; stdcall;

  exports ShowFormFieldColor (const FormName       : array of char;
                              const fieldNumber    : cardinal;
                              var   normalColor    : cardinal;
                              var   highlightColor : cardinal;
                              var   Error          : cardinal) name 'InfoLib_ShowFormFieldColor';




  procedure ShowFormFieldColor
             (const FormName       : string;
              const fieldNumber    : cardinal;
              var   normalColor    : cardinal;
              var   highlightColor : cardinal;
              var   Error          : cardinal); overload; stdcall;

  exports ShowFormFieldColor (const FormName       : string;
                              const fieldNumber    : cardinal;
                              var   normalColor    : cardinal;
                              var   highlightColor : cardinal;
                              var   Error          : cardinal) name 'InfoLib_STRShowFormFieldColor';




  procedure ShowFormInfo
             (const FormNumber  : cardinal;
              var   FormName    : array of char;
              var   FieldTotal  : cardinal;
              var   HelpForm    : array of char;
              var   topRow      : cardinal;
              var   bottomRow   : cardinal;
              var   leftColumn  : cardinal;
              var   rightColumn : cardinal;
              var   Error       : cardinal); stdcall;

  exports ShowFormInfo name 'InfoLib_ShowFormInfo';

  //*
  //  ShowFormInfo - Show information about the requeste form.
  //
  //
  //  This procedure returns information about the requested form.
  //  The form may be designated by sequential number (sorted
  //  alphabetically) or name.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowFormInfo (formNumber, formName, fieldTot, helpForm, topRow,
  //                  bottomRow, leftColumn, rightColumn, error)
  //
  //  ENTRY -
  //
  //    formNumber : cardinal
  //      Sequential number of form (1 .. n) or 0 if the form
  //      name is to be used instead.
  //
  //    formName : array of char
  //      The name of the requested form if the 'formNumber' has been
  //      set to 0 (zero).
  //
  //  EXIT -
  //
  //    formName : array of char
  //      The name of the form.
  //
  //    fieldTotal : cardinal
  //      The number of fields found on the form.
  //
  //    helpForm : array of char
  //      The name of the general help form associated with the
  //      requested form (or nul string if none defined).
  //      ('EXIT' is a reserved name for help processing termination.)
  //
  //    topRow : cardinal
  //      The top row of the form on the screen (1 .. 24).
  //
  //    bottomRow : cardinal
  //      The bottom row of the form on the screen (topRow .. 24).
  //
  //    leftColumn : cardinal
  //      The left column of the form on the screen (1 .. 80).
  //
  //    rightColumn : cardinal
  //      The right column of the form on the screen (leftColumn .. 80).
  //
  //    error : cardinal
  //      Sage error (0=ok).
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo7;
  //
  //       -- Assume that for a particular form we want to see if
  //       -- a field is named 'PSSN'.  We use ShowFormInfo to
  //       -- get how many fields are in the form and then we use
  //       -- ShowFormFieldInfo to get each fields' name.
  //
  //    IMPORT Display;
  //    IMPORT InfoLib;
  //    IMPORT StringsX;
  //
  //
  //    var
  //
  //       returnHelpForm  : array [0 .. 7] of char;
  //       returnFormName  : array [0 .. 7] of char;
  //       returnFieldName : array [0 .. 7] of char;
  //       returnRelName   : array [0 .. 7] of char;
  //
  //       repeatValue     : cardinal;
  //       typeOfDisplay   : cardinal;
  //       row             : cardinal;
  //       column          : cardinal;
  //       errorValue      : cardinal;
  //
  //       numOfFields     : cardinal;
  //       topRow          : cardinal;
  //       bottomRow       : cardinal;
  //       leftColumn      : cardinal;
  //       rightColumn     : cardinal;
  //       tabOrder        : cardinal;
  //       fieldNum        : cardinal;
  //
  //
  //    begin
  //       -- assume that OpenSystem has been called and that
  //       -- the form 'STUDENT' is in the DFL.
  //
  //       StringsX.NulFill ('STUDENT',
  //                         returnFormName);
  //
  //       ShowFormInfo (0,
  //                     returnFormName,
  //                     numOfFields,
  //                     returnHelpForm,
  //                     topRow,
  //                     bottomRow,
  //                     leftColumn,
  //                     rightColumn,
  //                     errorValue);
  //
  //       fieldNum := 1;
  //
  //       LOOP
  //         if fieldNum > numOfFields then begin
  //           break;
  //         end;
  //
  //         ShowFormFieldInfo ('STUDENT',
  //                            fieldNum,
  //                            returnRelName,
  //                            returnFieldName,
  //                            repeatValue,
  //                            returnHelpForm,
  //                            typeOfDisplay,
  //                            row,
  //                            column,
  //                            tabOrder,
  //                            errorValue);
  //
  //         if (Compare (returnFieldName[0 .. 3], 'PSSN') = equal) then begin
  //           DisplayMessage ('PSSN found.', True);
  //
  //           break;
  //         end;
  //
  //         fieldNum := fieldNum + 1;
  //       end;
  //
  //    end;  // InDemo7.
  //




  procedure ShowFormFieldInfo
             (const FormName    : array of char;
              const fieldNumber : cardinal;
              var   relName     : array of char;
              var   fieldName   : array of char;
              var   FldRepeat   : cardinal;
              var   HelpForm    : array of char;
              var   displayType : cardinal;
              var   row         : cardinal;
              var   column      : cardinal;
              var   tabOrder    : cardinal;
              var   Error       : cardinal); stdcall;

  exports ShowFormFieldInfo name 'InfoLib_ShowFormFieldInfo';

  //*
  //  ShowFormFieldInfo - Show information about a form's field.
  //
  //
  //  This procedure displays the information about a field of
  //  a requested form.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowFormFieldInfo (formName, fieldNumber, relName, fieldName,
  //                       repeat, helpForm, displayType, row, column, error)
  //
  //  ENTRY -
  //
  //    formName : array of char
  //      Name of the requested form.
  //
  //    fieldNumber : cardinal
  //      Number of the requested field on the form.  All fields are
  //      numbered sequentially starting from the top left corner of
  //      the form going from the left column to the right column,
  //      top row to the bottom row. (1 .. n)
  //
  //  EXIT -
  //
  //    relName : array of char
  //      Name of the relation associated with the requested form
  //      field.
  //
  //    fieldName : array of char
  //      Name of the relation's field associated with the requested
  //      form field.
  //
  //    repeat : cardinal
  //      Repeat number of the relation's field used for the requested
  //      field (1 .. n).
  //
  //    helpForm : array of char
  //      Name of the help form associated with requested form field.
  //      ('EXIT' is a reserved name for help processing termination.)
  //
  //    displayType : cardinal
  //      0-Display only, 1-Display/Entry, 2-Highlighted.
  //
  //    row : cardinal
  //      The row on the screen where the form field begins (1 .. 24).
  //
  //    column : cardinal
  //      The column on the screen where the form field begins (1 .. 80).
  //
  //    tabOrder : cardinal
  //      The tab order of the requested field.
  //
  //    error : cardinal
  //      Sage error (0=ok)
  //
  //  EXAMPLE -
  //
  //    SEE ShowFormInfo.
  //




  procedure GetRecordDes
             (const relName : array of char;
              var   Des     : array of char;
              var   Error   : cardinal); overload; stdcall;

  exports GetRecordDes (const relName : array of char;
                        var   Des     : array of char;
                        var   Error   : cardinal) name 'InfoLib_GetRecordDes';

  //*
  //  GetRecordDes - Get a record's description.
  //
  //
  //  This procedure retrieves the description (available if the
  //  .DFL was produced with THOR 3.1 or higher) for the specified
  //  record.
  //
  //  CALLING SEQUENCE -
  //
  //    GetRecordDes (relName, des, error)
  //
  //  ENTRY -
  //
  //    relName : array of char
  //      Relation name.
  //
  //  EXIT -
  //
  //    des : array of char     [0 .. 29]
  //      Record's (relation's) description.
  //
  //    error : cardinal
  //      Sage error (0=ok)
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo8;
  //
  //      -- Suppose we wanted to show the user the
  //      -- description of the relation 'DEMOREL2'.
  //      -- This Demo will get the description of
  //      -- 'DEMOREL2' as it was described in THOR.
  //
  //
  //         IMPORT InfoLib;
  //
  //
  //         var
  //
  //           description : array [0 .. 29] of char;
  //
  //           errorValue  : cardinal;
  //
  //         begin
  //           -- Assume that 'OpenSystem' has been called
  //           -- and the relation 'DEMOREL2' is contained in
  //           -- the DFL.
  //
  //           GetRecordDes ('DEMOREL2', description, errorValue);
  //
  //         end;  // InDemo8.
  //




  procedure GetRecordDes
             (const relName : string;
              var   Des     : string;
              var   Error   : cardinal); overload; stdcall;

  exports GetRecordDes (const relName : array of char;
                        var   Des     : array of char;
                        var   Error   : cardinal) name 'InfoLib_STRGetRecordDes';

  //*
  //  STRGetRecordDes - See documentation of GetRecordDes.
  //




  procedure GetFieldDes
             (const relName   : array of char;
              const fieldName : array of char;
              var   Des       : array of char;
              var   Error     : cardinal); stdcall;

  exports GetFieldDes name 'InfoLib_GetFieldDes';

  //*
  //  GetFieldDes - Get a field's description.
  //
  //
  //  This procedure retrieves a field's description (available if the
  //  .DFL was produced with THOR 3.1 or higher) for the specified
  //  record.
  //
  //  CALLING SEQUENCE -
  //
  //    GetFieldDes (relName, fieldName, des, error)
  //
  //  ENTRY -
  //
  //    relName : array of char
  //      Relation name.
  //
  //    fieldName : array of char
  //      Name of the relation's field.
  //
  //  EXIT -
  //
  //    des : array of char     [0 .. 29]
  //      Record's (relation's) description.
  //
  //    error : cardinal
  //      Sage error (0=ok)
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo9;
  //
  //       -- Suppose we wanted to show the user the
  //       --   description of the field 'PSSN' in the
  //       --   relation 'DEMOREL2'.
  //       --   This Demo will get the description of
  //       --   'PSSN' as it was described in THOR.
  //
  //
  //         IMPORT InfoLib;
  //
  //
  //         var
  //
  //           description     : array [0 .. 29] of char;
  //
  //           errorValue      : cardinal;
  //
  //         begin
  //           -- Assume that 'OpenSystem' has been called
  //           --   and the relation 'DEMOREL2' with the field
  //           --   'PSSN' is contained in the DFL.
  //
  //           GetFieldDes ('DEMOREL2',
  //                        'PSSN',
  //                        description,
  //                        errorValue);
  //
  //         end;  // InDemo9.
  //




  procedure GetDes
             (const relName  : array of char;
              const desMax   : cardinal;
              var   Des      : array of DesInfo;
              var   desTotal : cardinal;
              var   Error    : cardinal); overload; stdcall;

  exports GetDes (const relName  : array of char;
                  const desMax   : cardinal;
                  var   Des      : array of DesInfo;
                  var   desTotal : cardinal;
                  var   Error    : cardinal) name 'InfoLib_GetDes';

  //*
  //  GetDes - Get the description for a relation and its fields.
  //
  //
  //  This procedure retrieves the descriptions for the specified
  //  relation and as many of its fields as can be contained
  //  within the supplied array.
  //
  //  CALLING SEQUENCE -
  //
  //    GetDes (relName, desMax, des, desTotal, error)
  //
  //  ENTRY -
  //
  //    relName : array of char
  //      Relation name.
  //
  //    desMax : cardinal
  //      The maximum number of name/description (DesInfo) pairs
  //      which may be retrieved.
  //
  //  EXIT -
  //
  //    des : array of DesInfo
  //      The name/description pairs requested.  The first pair
  //      will be for the relation and the following pairs will
  //      be the field names and descriptions up to 'desMax' or
  //      the total number of fields in the relation (whichever
  //      comes first).
  //
  //    desTotal : cardinal
  //      The total number of name/description pairs returned
  //      in the 'des' array.
  //
  //    error : cardinal
  //      Sage error (0=ok)
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo10;
  //
  //      -- Suppose we wanted to show the user all
  //      -- of the names and descriptions of the
  //      -- relation 'DEMOREL2' including the
  //      -- relation description.  Also the maximum
  //      -- descriptions (including the relation
  //      -- description) to be shown is 5.
  //
  //
  //    IMPORT Display;
  //    IMPORT InfoLib;
  //                            DesInfo;
  //    IMPORT ThorPort;
  //    IMPORT StringsX;
  //                            Concat;
  //
  //
  //    var
  //
  //      descArray  : array [0 .. 4] of DesInfo;
  //
  //
  //      tempString : array [0 .. 49] of char;
  //
  //      descTotal  : cardinal;
  //      errorValue : cardinal;
  //      numDesc    : cardinal;
  //
  //
  //      done       : boolean;
  //
  //
  //    begin
  //      -- Assume that 'OpenSystem' has been called
  //      -- and 'DEMOREL2' is in the DFL.
  //
  //      GetDes ('DEMOREL2',
  //      5,
  //      descArray,
  //      descTotal,
  //      errorValue);
  //
  //      for numDesc := 0 to descTotal - 1 do begin
  //        NulFill (tempString, tempString);
  //
  //        Concat (descArray[numDesc].name,
  //                '   ',
  //                tempString,
  //                done  );
  //
  //        Concat (tempString,
  //                descArray[numDesc].des,
  //                tempString,
  //                done  );
  //
  //        DisplayMessage (tempString, False);
  //
  //        ThorPort.Pause (2000);
  //      end;
  //
  //    end;  // InDemo10.
  //




  procedure GetDes
             (const relName  : string;
              const desMax   : cardinal;
              var   Des      : array of DesInfo;
              var   desTotal : cardinal;
              var   Error    : cardinal); overload; stdcall;

  exports GetDes (const relName  : string;
                  const desMax   : cardinal;
                  var   Des      : array of DesInfo;
                  var   desTotal : cardinal;
                  var   Error    : cardinal) name 'InfoLib_STRGetDes';

  //*
  //  STRGetDes - See documentation of GetDes.
  //




  procedure GetMasterView
             (var   viewName : array of char;
              var   viewDes  : array of char;
              var   viewNum  : cardinal); stdcall;

  exports GetMasterView name 'InfoLib_GetMasterView';

  //*
  //  GetMasterView - Return master view information.
  //
  //
  //  This procedure returns the master view information.  If no
  //  master view is available, then the 'viewNum' variable
  //  is returned with a 0 (zero).
  //
  //  CALLING SEQUENCE -
  //
  //    GetMasterView (viewName, viewDes, viewNum)
  //
  //  EXIT -
  //
  //    viewName : array of char
  //      The name of the master view (up to 8 char).
  //
  //    viewDes : array of char
  //      The description accompanying the master view (up to 30 char).
  //
  //    viewNum : cardinal
  //      The view number (0 .. n) where 0 (zero) indicates that no
  //      master view is present.  Note - if THERE IS NO MASTER VIEW,
  //      then NO VIEWS AT ALL ARE AVAILABLE
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo11;
  //
  //      -- Suppose we wanted to know if views exits
  //      -- and if so what the name of the master view
  //      -- is.  This demo will find out what the
  //      -- master view is.
  //
  //
  //    IMPORT Display;
  //    IMPORT InfoLib;
  //    IMPORT StringsX;
  //
  //    var
  //
  //      viewName        : array [0 .. 7] of char;
  //      description     : array [0 .. 29] of char;
  //      tempString      : array [0 .. 39] of char;
  //
  //      numOfView       : cardinal;
  //
  //
  //      done            : boolean;
  //
  //
  //    begin
  //      -- Assume that 'OpenSystem' has been called.
  //
  //      GetMasterView (viewName,
  //                     description,
  //                     numOfView);
  //
  //      if numOfView > 0 then  -- master view available
  //        NulFill (tempString, tempString);
  //
  //        Concat ('Master View is ',
  //                viewName,
  //                tempString,
  //                done );
  //
  //        DisplayMessage (tempString, False);
  //      end else begin
  //        DisplayMessage ('No views available.', True);
  //      end;
  //
  //    end;  // InDemo11.
  //




  function TotalViews
             () : cardinal; stdcall;

  exports TotalViews name 'InfoLib_TotalViews';

  //*
  //  TotalViews - Return the total number of views available.
  //
  //
  //  This procedure returns the total number of views available in
  //  the current data base dictionary file.
  //
  //  CALLING SEQUENCE -
  //
  //    c := TotalViews ();
  //
  //  EXIT -
  //
  //    c : cardinal
  //      The total number of views available.
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo12;
  //
  //      -- This Demo shows how many views there are in
  //      -- the DFL and goes through each View, displaying
  //      -- the Veiw name and the associated Joins also
  //      -- showing how many Joins there are for the
  //      -- View name.
  //
  //
  //    IMPORT Convert;
  //    IMPORT Display;
  //    IMPORT InfoLib;
  //    IMPORT StringsX;
  //    IMPORT ThorPort;
  //
  //
  //    var
  //
  //      viewNames       : array [0 .. 4] of DesInfo;
  //      joinPairs       : array [0 .. 4] of JoinInfo;
  //
  //
  //      tempString1     : array [0 .. 4] of char;
  //      tempString2     : array [0 .. 39] of char;
  //
  //      numOfViews      : cardinal;
  //      totalNumJoins   : cardinal;
  //      viewNum         : cardinal;
  //      joinNum         : cardinal;
  //
  //
  //      done            : boolean;
  //
  //    begin
  //      -- Assume that 'OpenSystem' has been called.
  //
  //      numOfViews := TotalViews ();
  //
  //      NulFill (tempString1, tempString1);
  //      NulFill (tempString2, tempString2);
  //
  //      IntToStr (numOfViews,
  //                tempString1,
  //                5,
  //                done );
  //
  //      Concat ('Total Number of Views = ',
  //      tempString2,
  //      tempString2,
  //      done );
  //
  //      Concat (tempString2,
  //      tempString1,
  //      tempString2,
  //      done );
  //
  //      DisplayMessage (tempString2, False);
  //
  //
  //      ThorPort.Pause (2000);
  //
  //      GetViewNames (1, numOfViews, viewNames);
  //
  //      for viewNum := 1 to numOfViews do begin
  //
  //        NulFill (tempString1, tempString1);
  //        NulFill (tempString2, tempString2);
  //
  //        Concat ('Views name = ',
  //                viewNames[viewNum].name,
  //                tempString2,
  //                done );
  //
  //          DisplayMessage (tempString2, False);
  //
  //          Concat (tempString2,
  //                  tempString1,
  //                  tempString2,
  //                  done );
  //
  //          ThorPort.Pause (2000);
  //
  //
  //          totalNumJoins := TotalJoins (viewNames[viewNum].name);
  //
  //          NulFill (tempString2, tempString2);
  //
  //          IntToStr (totalNumJoins,
  //                    tempString1,
  //                    5,
  //                    done );
  //
  //          Concat ('Total Number of Joins = ',
  //                  tempString1,
  //                  tempString2,
  //                  done );
  //
  //          DisplayMessage (tempString2, False);
  //
  //          ThorPort.Pause (2000);
  //
  //          GetJoins ('SSNS', 1, totalNumJoins, joinPairs);
  //
  //          for joinNum := 1 to totalNumJoins do begin
  //            NulFill (tempString2, tempString2);
  //
  //            Concat ('Relation 1 name = ',
  //                    joinPairs[joinNum].rel1,
  //         tempString2,
  //         done );
  //
  //            DisplayMessage (tempString2, False);
  //
  //            ThorPort.Pause (2000);
  //
  //            NulFill (tempString2, tempString2);
  //
  //            Concat ('Relation 2 name = ',
  //                    joinPairs[joinNum].rel2,
  //                    tempString2,
  //                    done );
  //
  //            DisplayMessage (tempString2, False);
  //
  //            ThorPort.Pause (2000);
  //          end;
  //        end;
  //
  //      end;  // InDemo12.
  //




  procedure GetViewNames
             (const startView  : cardinal;
              var   TotalViews : cardinal;
              var   viewNames  : array of DesInfo); stdcall;

  exports GetViewNames name 'InfoLib_GetViewNames';

  //*
  //  GetViewNames - Return a list of view names and descriptions.
  //
  //
  //  This procedure returns a list of the requested view names
  //  along with their accompanying descriptions.
  //
  //  CALLING SEQUENCE -
  //
  //    GetViewNames (startView, totalViews, viewNames)
  //
  //  ENTRY -
  //
  //    startView : cardinal
  //      The starting view number to return in the name list
  //      (1 .. n wher n=total views).
  //
  //    totalViews : cardinal
  //      The total number of views to return in the list beginning
  //      at the 'startView'.  If more views are requested than
  //      available, the number available will be returned.
  //
  //  EXIT -
  //
  //    totalView : cardinal
  //      The number of view names/descriptions returned.
  //
  //    viewName : array of DesInfo
  //      A list of view names and descriptions.
  //
  //  EXAMPLE -
  //
  //    SEE TotalViews.
  //




  function TotalJoins
             (const viewName : array of char) : cardinal; stdcall;

  exports TotalJoins name 'InfoLib_TotalJoins';

  //*
  //  TotalJoins - Return the total join pairs in a view.
  //
  //
  //  This procedure returns the total number of join pairs in
  //  a selected view.
  //
  //  CALLING SEQUENCE -
  //
  //    c := TotalJoins ();
  //
  //  ENTRY -
  //
  //    viewName : array of char
  //      The name of the view to look for join pairs
  //      (up to 8 char).
  //
  //  EXIT -
  //
  //    c : cardinal
  //      The total number of join pairs in a view.
  //
  //  EXAMPLE -
  //
  //    SEE TotalViews.
  //




  procedure GetJoins
             (const viewName   : array of char;
              const startJoin  : cardinal;
              var   TotalJoins : cardinal;
              var   joinPairs  : array of JoinInfo); stdcall;

  exports GetJoins name 'InfoLib_GetJoins';

  //*
  //  GetJoins - Return join pairs.
  //
  //
  //  This procedure returns requested join pairs.
  //
  //  CALLING SEQUENCE -
  //
  //    GetJoins (viewName, startJoin, totalJoins, joinPairs)
  //
  //  ENTRY -
  //
  //    viewName : array of char
  //      The name of the view.
  //
  //    startJoin : cardinal
  //      The number of the first join pair to return.
  //
  //    totalJoins : cardinal
  //      The max number of join pairs to return in the 'joinPairs'
  //      array. (1 .. n)
  //
  //  EXIT -
  //
  //    totalJoins : cardinal
  //      The number of join pairs returned in 'joinPairs'.
  //
  //    joinPairs : array of JoinInfo
  //      The join pairs.
  //
  //  EXAMPLE -
  //
  //    SEE TotalViews.
  //




  function TotalViewRelations
             (const viewName : array of char) : cardinal; stdcall;

  exports TotalViewRelations name 'InfoLib_TotalViewRelations';

  //*
  //  TotalViewRelations - The total number of relations accessed by a view.
  //
  //
  //  This procedure returns the total number of relations which are
  //  viewable from the selected view.
  //
  //  CALLING SEQUENCE -
  //
  //    c := TotalViewrelations (viewName);
  //
  //  ENTRY -
  //
  //    viewName : array of char
  //      The name of the view to look for relations
  //      (up to 8 char).
  //
  //  EXIT -
  //
  //    c : cardinal
  //      The total number of relations accessed by a view.
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo16;
  //
  //      -- This demo will show how many relations
  //      -- are viewable from a View and then
  //      -- show some of the relations.
  //
  //    IMPORT Convert;
  //    IMPORT Display;
  //    IMPORT InfoLib;
  //    IMPORT StringsX;
  //    IMPORT ThorPort;
  //
  //
  //    var
  //      totalRelations : cardinal;
  //      relationNum    : cardinal;
  //
  //
  //      relations      : array [0 .. 9] of InfoName;
  //
  //
  //      tempString1    : array [0 .. 4] of char;
  //      tempString2    : array [0 .. 39] of char;
  //
  //
  //      done           : boolean;
  //
  //    begin
  //      -- Assume that 'OpenSystem' has been called
  //      -- and that the View name 'SSNS' is in the DFL.
  //
  //      totalRelations := TotalViewRelations ('SSNS');
  //
  //      NulFill (tempString1, tempString1);
  //      NulFill (tempString2, tempString2);
  //
  //      IntToStr (totalRelations,
  //                tempString1,
  //                5,
  //                done );
  //
  //      Concat ('Total relations viewable is ',
  //      tempString2,
  //      tempString2,
  //      done );
  //
  //      Concat (tempString2,
  //      tempString1,
  //      tempString2,
  //      done );
  //
  //      DisplayMessage (tempString2, False);
  //
  //      ThorPort.Pause (2000);
  //
  //      if totalRelations > 10 then begin
  //        totalRelations := 10;
  //      end;
  //
  //      GetViewRelations ('SSNS',
  //                        1,
  //                        totalRelations,
  //                        relations);
  //
  //      for relationNum := 0 to totalRelations - 1 do begin
  //        DisplayMessage (relations[relationNum], False);
  //
  //        ThorPort.Pause (2000);
  //
  //      end;
  //
  //    end;  // InDemo16.
  //




  procedure RelationViewInfo
             (const viewName    : array of char;
              const relNumber   : cardinal;
              const relName     : array of char;
              var   firstField  : cardinal;
              var   totalFields : cardinal); stdcall;

  exports RelationViewInfo name 'InfoLib_RelationViewInfo';

  //*
  //  RelationViewInfo - Return info about a relation in a view.
  //
  //
  //  This procedure returns field info about a relation from a
  //  selected view.  A view is composed of fields from one or
  //  more relations.  This procedure returns the field number of
  //  the first field within all of the viewable fields which belongs
  //  to the given relation number.
  //
  //  CALLING SEQUENCE -
  //
  //    RelationViewInfo (viewName, relNumber, firstField, totalFields)
  //
  //  ENTRY -
  //
  //    viewName : array of char
  //      The name of the view.
  //
  //    relNumber : cardinal
  //      The number of the relation within the view for which field
  //      information is requested (set to 0 if the 'relName' is to
  //      be supplied instead).
  //
  //    relName : array of char
  //      The name of the relation for which information is required.
  //      This is only used if 'relNumber' is set to 0 (zero).
  //
  //  EXIT -
  //
  //    firstField : cardinal
  //      The first field within all of the fields of the view which
  //      comes from the requested relation.
  //
  //    totalFields : cardinal
  //      The total number of fields (numbered from the 'firstField'
  //      which are contained within the view and come from the
  //      selected relation.  (For example, if the 'firstField' were
  //      3 and 'totalFields' were 5, then the fields for the relation
  //      in the view would be field numbers 3 .. 7).
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo17;
  //
  //      -- This demo will get how many fields of a
  //      -- relation that are associated with a view.
  //
  //
  //    IMPORT InfoLib;
  //
  //
  //    var
  //      firstField  : cardinal;
  //      totalFields : cardinal;
  //
  //
  //    begin
  //      -- Assume that 'OpenSystem' has been called
  //      -- and that there is a View name 'SSNS' and
  //      -- relation name 'DEMOREL2' in the DFL.
  //
  //      RelationViewInfo ('SSNS',
  //                        0,
  //                        'DEMOREL2',
  //                        firstField,
  //                        totalFields);
  //
  //
  //    end;  // InDemo17.
  //




  procedure GetViewRelations
             (const viewName  : array of char;
              const startRel  : cardinal;
              var   totalRels : cardinal;
              var   Rels      : array of InfoName); stdcall;

  exports GetViewRelations name 'InfoLib_GetViewRelations';

  //*
  //  GetViewRelations - Get relation info from a view.
  //
  //
  //  This procedure returns requested relation info from the
  //  selected view.
  //
  //  CALLING SEQUENCE -
  //
  //    GetViewRelations (viewName, startRel, totalRels, rels)
  //
  //  ENTRY -
  //
  //    viewName : array of char
  //      The name of the view.
  //
  //    startRel : cardinal
  //      The number of the first relation to return;
  //
  //    totalRels : cardinal
  //      The max number of relations to return in the 'rels'
  //      array. (1 .. n)
  //
  //  EXIT -
  //
  //    totalRels : cardinal
  //      The number of relations returned.
  //
  //    rels : array of InfoName
  //      The requested relation names from the view.
  //
  //  EXAMPLE -
  //
  //    SEE TotalViewRelations.
  //




  function TotalViewFields
             (const viewName : array of char) : cardinal; stdcall;

  exports TotalViewFields name 'InfoLib_TotalViewFields';

  //*
  //  TotalViewFields - The total number of fields in a view.
  //
  //
  //  This procedure returns the total number of viewable fields in
  //  the selected view.
  //
  //  CALLING SEQUENCE -
  //
  //    c := TotalViewFields (viewName);
  //
  //  ENTRY -
  //
  //    viewName : array of char
  //      The name of the view to look for fields
  //      (up to 8 char).
  //
  //  EXIT -
  //
  //    c : cardinal
  //      The total number of fields in a view.
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo19;
  //
  //      -- This demo will show how many fields
  //      -- are viewable from a View and then
  //      -- show some of the relation/field pairs.
  //
  //
  //    IMPORT Convert;
  //    IMPORT Display;
  //    IMPORT InfoLib;
  //    IMPORT StringsX;
  //    IMPORT ThorPort;
  //
  //
  //    var
  //
  //      fields          : array [0 .. 9] of FieldID;
  //
  //
  //      tempString1     : array [0 .. 4] of char;
  //      tempString2     : array [0 .. 39] of char;
  //
  //      totalViewFields : cardinal;
  //      fieldNum        : cardinal;
  //
  //
  //      done            : boolean;
  //
  //
  //    begin
  //      -- Assume that 'OpenSystem' has been called
  //      -- and that the View name 'SSNS' is in the DFL.
  //
  //      totalViewFields := TotalViewFields ('SSNS');
  //
  //      NulFill (tempString1, tempString1);
  //      NulFill (tempString2, tempString2);
  //
  //      IntToStr (totalViewFields, tempString1, 5, done);
  //
  //      Concat ('Total fields viewable is ',
  //      tempString1,
  //      tempString2,
  //      done );
  //
  //      DisplayMessage (tempString2, False);
  //
  //      ThorPort.Pause (2000);
  //
  //      if totalViewFields > 10 then begin
  //        totalViewFields := 10;
  //      end;
  //
  //
  //      GetViewFields ('SSNS',
  //                     1,
  //                     totalViewFields,
  //                     fields);
  //
  //
  //      for fieldNum := 0 to totalViewFields - 1 do begin
  //
  //        NulFill (tempString2, tempString2);
  //
  //        Concat (fields[fieldNum].relName,
  //                '   ',
  //                tempString2,
  //                done );
  //
  //        Concat (tempString2,
  //                fields[fieldNum].fieldName,
  //                tempString2,
  //                done );
  //
  //        DisplayMessage (tempString2, False);
  //
  //        ThorPort.Pause (2000);
  //
  //      end;
  //
  //    end;  // InDemo19.
  //




  procedure GetViewFields
             (const viewName    : array of char;
              const startField  : cardinal;
              var   totalFields : cardinal;
              var   fields      : array of FieldID); stdcall;

  exports GetViewFields name 'InfoLib_GetViewFields';

  //*
  //  GetViewFields - Return the requested field identifier.
  //
  //
  //  This procedure returns the requested field identifiers
  //  (relation name and field name pairs) from the selected
  //  view.
  //
  //  CALLING SEQUENCE -
  //
  //    GetViewFields (viewName, startField, totalFields, fields)
  //
  //  ENTRY -
  //
  //    viewName : array of char
  //      The name of the view.
  //
  //    startField : cardinal
  //      The number of the first field ID to return.
  //
  //    totalFields : cardinal
  //      The max number of field ID values to return in the 'fields'
  //      array. (1 .. n)
  //
  //  EXIT -
  //
  //    totalFields : cardinal
  //      The number of field ID values returned.
  //
  //    fields : array of FieldID
  //      An array of the requested field data.  This data is in
  //      the form of paired names of 8 characters each (see
  //      the 'FieldID' type description at the first of this
  //      library) which contain the relation name/field name.
  //
  //  EXAMPLE -
  //
  //    SEE TotalViewFields.
  //




  procedure FieldEmpty
             (const relName   : array of char;
              const fieldName : array of char;
              var   Empty     : boolean;
              var   Error     : cardinal); overload; stdcall;

  exports FieldEmpty (const relName   : array of char;
                      const fieldName : array of char;
                      var   Empty     : boolean;
                      var   Error     : cardinal) name 'InfoLib_FieldEmpty';

  //*
  //  FieldEmpty - Check for an empty field.
  //
  //
  //  This routine returns True if the requested field in memory is
  //  empty (null filled).
  //
  //  CALLING SEQUENCE -
  //
  //    FieldEmpty (relName, fieldName, empty, error)
  //
  //  ENTRY -
  //
  //    relName : array of char
  //      The name of the relation to get the information from.
  //
  //    fieldName : array of char
  //      The name of the field to be used.
  //
  //  EXIT -
  //
  //    empty : boolean
  //      The field is empty (True) or not.
  //
  //    error : cardinal
  //      An error flag indicating the result of the operation.
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo21;
  //       -- Suppose in Checklib we wanted to see if a field
  //       -- was blank or null filled, this demo will detect
  //       -- a blank field.
  //
  //
  //    IMPORT Display;
  //    IMPORT InfoLib;
  //
  //
  //    var
  //
  //       empty : boolean;
  //
  //       errorValue : cardinal;
  //
  //
  //    begin
  //       -- Assume that 'OpenSystem' has been called and
  //       -- there is a relation 'DEMOREL2' with a field
  //       -- 'PSSN' in the DFL.  Also assume that we are in
  //       -- Checklib after a form has been displayed and the
  //       -- field 'PSSN' was defined as the current field.
  //
  //       FieldEmpty ('DEMOREL2',
  //                   'PSSN',
  //                   empty,
  //                   errorValue);
  //
  //       if empty then begin
  //         DisplayMessage ('Fill out information.', True);
  //       end;
  //
  //       -- continue on with other Checklib items.
  //    end;  // InDemo21.
  //




  procedure FieldEmpty
             (const relName   : string;
              const fieldName : string;
              var   Empty     : boolean;
              var   Error     : cardinal); overload; stdcall;

  exports FieldEmpty (const relName   : string;
                      const fieldName : string;
                      var   Empty     : boolean;
                      var   Error     : cardinal) name 'InfoLib_STRFieldEmpty';

  //*
  //  STRFieldEmpty - See documentation of FieldEmpty.
  //




  procedure FieldBlank
             (const relName   : array of char;
              const fieldName : array of char;
              var   Blank     : boolean;
              var   Error     : cardinal); overload; stdcall;

  exports FieldBlank (const relName   : array of char;
                      const fieldName : array of char;
                      var   Blank     : boolean;
                      var   Error     : cardinal) name 'InfoLib_FieldBlank';

  //*
  //  FieldBlank - Check for an empty or blank field.
  //
  //
  //  This routine returns True if the requested field in memory is
  //  blank signified by all nulls and/or blanks.
  //
  //  CALLING SEQUENCE -
  //
  //    FieldBlank (relName, fieldName, blank, error)
  //
  //  ENTRY -
  //
  //    relName : array of char
  //      The name of the relation to get the information from.
  //
  //    fieldName : array of char
  //      The name of the field to be used.
  //
  //  EXIT -
  //
  //    blank : boolean
  //      The field is blank (True) or not.
  //
  //    error : cardinal
  //      An error flag indicating the result of the operation.
  //
  //  EXAMPLE -
  //
  //    MODULE InDemo22;
  //     -- Suppose in Checklib we wanted to see if a field
  //     -- was blank or not, this demo will detect a blank
  //     -- field.
  //
  //    IMPORT Display;
  //    IMPORT InfoLib;
  //
  //    var
  //
  //       blank : boolean;
  //
  //       errorValue : cardinal;
  //
  //    begin
  //       -- Assume that 'OpenSystem' has been called and
  //       -- there is a relation 'DEMOREL2' with a field
  //       -- 'PSSN' in the DFL.  Also assume that we are in
  //       -- Checklib after a form has been displayed and the
  //       -- field 'PSSN' was defined as the current field.
  //
  //       FieldBlank ('DEMOREL2',
  //                   'PSSN',
  //                   blank,
  //                   errorValue);
  //
  //       if blank then begin
  //         DisplayMessage ('Fill out information.', True);
  //       end;
  //
  //       -- continue on with other Checklib items.
  //    end;  // InDemo22.
  //




  procedure FieldBlank
             (const relName   : string;
              const fieldName : string;
              var   Blank     : boolean;
              var   Error     : cardinal); overload; stdcall;

  exports FieldBlank (const relName   : string;
                      const fieldName : string;
                      var   Blank     : boolean;
                      var   Error     : cardinal) name 'InfoLib_STRFieldBlank';

  //*
  //  STRFieldBlank - See documentation of FieldBlank.
  //




  procedure CharacterIsValid
             (const RelationName : array of char;
              const fieldName    : array of char;
              var   TheChar      : char;
              const charOffset   : cardinal;
              var   valid        : boolean); stdcall;

  exports CharacterIsValid name 'InfoLib_CharacterIsValid';

  //*
  //  CharacterIsValid - Check validity of character in field.
  //
  //
  //  This procedure checks the validity of a given character against
  //  a field at a specified position.
  //
  //  CALLING SEQUENCE -
  //
  //    CharacterIsValid (relationName, fieldName,
  //                      c, charOffset, Valid)
  //
  //  ENTRY -
  //
  //    relationName : array of char
  //      Name of relation.
  //
  //    fieldName : array of char
  //      Name of field within 'relationName'.
  //
  //    c : char
  //      Character to check.
  //
  //    charOffset : cardinal
  //      Positon of character within the field (0 .. n).
  //
  //  EXIT -
  //
  //    Valid : boolean
  //      True = valid.
  //




  procedure ValidateField
             (const RelationName : array of char;
              const fieldName    : array of char;
              const Value        : array of char;
              var   Error        : cardinal); overload; stdcall;

  exports ValidateField (const RelationName : array of char;
                         const fieldName    : array of char;
                         const Value        : array of char;
                         var   Error        : cardinal) name 'InfoLib_ValidateField';

  //*
  //  ValidateField - Check validity of Field in record.
  //
  //
  //  This procedure checks the validity of a given Field in the record.
  //  This procedure is not to BE USED for CONCATENATED FIELDS, and such
  //  fields.
  //
  //  CALLING SEQUENCE -
  //
  //    ValidateField (relationName, fieldName, value, error)
  //
  //  ENTRY -
  //
  //    relationName : array of char
  //      Name of relation.
  //
  //    fieldName : array of char
  //      Name of field within 'relationName'.
  //
  //    value : array of char
  //      Field value to check.
  //
  //  EXIT -
  //
  //    error : cardinal
  //      Error status return (0=ok).
  //




  procedure ValidateField
             (const RelationName : string;
              const fieldName    : string;
              const Value        : string;
              var   Error        : cardinal); overload; stdcall;

  exports ValidateField (const RelationName : string;
                         const fieldName    : string;
                         const Value        : string;
                         var   Error        : cardinal) name 'InfoLib_STRValidateField';

  //*
  //  STRValidateField - See documentation of ValidateField.
  //




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