![]() |
|
![]() |
procedure CloseAllSystems; --* -- CloseAllSystems - Close all open systems. -- -- (Refer to the documentation for the same procedure in the Sage package). --
procedure CloseSystem; --* -- CloseSystem - Close the current system. -- -- (Refer to the documentation for the same procedure in the Sage package). --
procedure CloseSystemNumber
(systemNumber : in ModSys.S_Natural);
--*
-- CloseSystemNumber - Close the specified system.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure CloseRelation
(Relation : in string);
--*
-- CloseRelation - Close a relation.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
function CurrentSystemNumber return ModSys.S_Natural; --* -- CurrentSystemNumber - Return number assigned to current system. -- -- (Refer to the documentation for the same procedure in the Sage package). --
procedure DeleteRecord
(Relation : in string);
--*
-- DeleteRecord - Delete a record of a relation.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure DuplicateBlock
(Relation : in string;
Field : in string);
--*
-- DuplicateBlock - Duplicate block data giving a new reference.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure EnableRecordLocking
(state : in boolean);
--*
-- EnableRecordLocking - Set the record locking state.
--
--
-- If "State" is TRUE then all record locking procedures are
-- enabled, otherwise they are disabled.
--
-- Setting "State" to TRUE provides the maximum protection in
-- a multi-user environment. The performance of the system is
-- degraded in this mode.
--
-- Setting "State" to FALSE provides the minimum protection in
-- a multi-user environment. The performance of the system is
-- at its maximum in this mode. In most cases, this mode is used
-- where the programmer will control the multi-user aspects of
-- the system using the semaphore mechanisms provided herein.
--
-- By default the system is set with "State" as TRUE;
--
-- CALLING SEQUENCE -
--
-- EnableRecordLocking (State);
--
-- ENTRY -
--
-- State : boolean
-- The desired state for system record locking.
--
procedure ExclusiveReadLockRelation
(RelationName : in string;
LockTimeOut : in ModSys.S_Natural);
--*
-- ExclusiveReadLockRelation - Read lock an entire relation.
--
--
-- The relation "RelationName" is read locked. This will prohibit
-- any other user from reading, rewriting or writing any records in
-- the relation.
--
-- The procedure will try for "LockTimeOut" seconds to lock the
-- relation. If it times out a sage error will be set. If "LockTimeOut"
-- is 0 it will wait forever.
--
-- The difference between this procedure and "ReadLockRelation" is
-- that this procedure cannot be preempted and hence runs faster.
--
-- CALLING SEQUENCE -
--
-- ExclusiveReadLockRelation (RelationName, LockTimeOut)
--
-- ENTRY -
--
-- RelationName : string
-- The name of the relation to be locked.
--
-- LockTimeOut : ModSys.S_Natural
-- The time in seconds to try to lock.
--
-- EXIT -
--
-- Sage error is set if "RelationName" is invalid or the relation
-- "RelationName" is already locked.
--
procedure ExclusiveUnlockRelation
(RelationName : in string);
--*
-- ExclusiveUnlockRelation - Unlock an entire relation.
--
--
-- The relation "RelationName" is unlocked. If any other locks
-- other than an exclusive lock is currently in force, it will
-- also be removed.
--
-- CALLING SEQUENCE -
--
-- ExclusiveUnlockRelation (RelationName)
--
-- ENTRY -
--
-- RelationName : string
-- The name of the relation to lock.
--
-- EXIT -
--
-- Sage error is set if "RelationName" is invalid, the relation
-- "RelationName" is not locked, or the lock timed out.
--
procedure ExclusiveWriteLockRelation
(RelationName : in string;
LockTimeOut : in ModSys.S_Natural);
--*
-- ExclusiveWriteLockRelation - Write lock an entire relation.
--
--
-- The relation "RelationName" is write locked. This will prohibit
-- any other user from rewriting or writing any records in the relation.
--
-- The procedure will try for "LockTimeOut" seconds to lock the
-- relation. If it times out a sage error will be set. If "LockTimeOut"
-- is 0 it will wait forever.
--
-- The difference between this procedure and "WriteLockRelation" is
-- that this procedure cannot be preempted and hence runs faster.
--
-- CALLING SEQUENCE -
--
-- ExclusiveWriteLockRelation (RelationName, LockTimeOut)
--
-- ENTRY -
--
-- RelationName : string
-- The name of the relation to be locked.
--
-- LockTimeOut : ModSys.S_Natural
-- The time in seconds to try to lock.
--
-- EXIT -
--
-- Sage error is set if "RelationName" is invalid or the relation
-- "RelationName" is already locked.
--
function RecordLockPending
(RelationName : in string) return boolean;
--*
-- RecordLockPending - A record lock has been requested for next Read.
--
function ExclusiveLocked
(RelationName : in string) return boolean;
--*
-- ExclusiveLocked - Determine if you have an exclusive rel. lock.
--
procedure FindRecord
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations);
--*
-- FindRecord - Find a record of a relation.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure FindRecordA
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations;
Alpha : in string);
--*
-- FindRecordA - Find a record with an alpha field.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure FindRecordF
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations;
RealVal : in ModSys.S_Float);
--*
-- FindRecordF - Find a record with a floating point field.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure FindRecordI
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations;
NumberValue : in ModSys.S_Integer);
--*
-- FindRecordI - Base FindRecordI overloaded to handle Modsys.S_Integer.
--
-- See FindRecordI declaration above for details.
--
procedure FindRecordI
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations;
NumberValue : in ModSys.S_Natural);
--*
-- FindRecordI - Base FindRecordI overloaded to handle Modsys.S_Natural.
--
-- See FindRecordI declaration above for details.
--
procedure FindRecordN
(Relation : in string;
Field : in string;
Number : in ModSys.S_Natural);
--*
-- FindRecordN - Find a record of a relation by number.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure FindRecordR
(Relation1 : in string;
Field1 : in string;
Operation : in Sage.SageOperations;
Relation2 : in string;
Field2 : in string);
--*
-- FindRecordR - Find a record of a relation.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure GenerateUniqueKey
(Relation : in string;
Field : in string;
keyNum : in out ModSys.S_Natural);
--*
-- GenerateUniqueKey - Generate a unique key for the relation.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure GetBlock
(Relation : in string;
Field : in string;
Buff : in System.Address;
nBytes : in out ModSys.S_Natural;
firstByte : in out ModSys.S_Natural);
--*
-- GetBlock - Get data from a variable length block data type field.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure GetBlockSize
(Relation : in string;
Field : in string;
size : in out ModSys.S_Natural);
--*
-- GetBlockSize - Get size of a block data field.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure GetKeyPosition
(Relation : in string;
Field : in string;
Position : in out ModSys.S_Natural);
--*
-- GetKeyPosition - Returns the position of the current key.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
function GetRecordPreemptTime return ModSys.S_Natural; --* -- GetRecordPreemptTime - Get default record preempt time. -- -- -- The current value of the system default record preempt time -- is returned. -- -- CALLING SEQUENCE - -- -- Seconds := GetRecordPreemptTime; -- -- EXIT - -- -- Seconds : ModSys.S_Natural -- The current value of the system record preempt time. --
function GetRelationPreemptTime return ModSys.S_Natural; --* -- GetRelationPreemptTime - Get default relation preempt time. -- -- -- The current value of the system default relation preempt time -- is returned. -- -- CALLING SEQUENCE - -- -- Seconds := GetRelationPreemptTime; -- -- EXIT - -- -- Seconds : ModSys.S_Natural -- The current value of the system relation preempt time. --
procedure GetUserID
(CurrentUserID : in out string);
--*
-- GetUserID - Get the User ID.
--
--
-- The current value of the UserID is gotten.
--
-- CALLING SEQUENCE -
--
-- GetUserID (CurrentUserID);
--
-- EXIT -
--
-- CurrentUserID : string
-- A three-character array.
--
function SystemIsOpen
(Dictionary : in string) return boolean;
--*
-- SystemIsOpen - Check if the system is already opened.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure OpenSystem
(Dictionary : in string;
MaxForms : in ModSys.S_Natural;
MaxScreens : in ModSys.S_Natural;
BufferSize : in ModSys.S_Natural);
--*
-- OpenSystem - Open a system for processing.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure OpenRelation
(Relation : in string;
Modify : in boolean);
--*
-- OpenRelation - Open a DataBase relation for processing.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure PutBlock
(Relation : in string;
Field : in string;
Buff : in System.Address;
nBytes : in ModSys.S_Natural;
firstByte : in out ModSys.S_Natural);
--*
-- PutBlock - Put data into a variable length block data type field.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure ReadLockRecord
(RelationName : in string;
LockTimeOut : in ModSys.S_Natural;
PreemptTimeOut : in ModSys.S_Natural);
--*
-- ReadLockRecord - Cause next record read to be read locked.
--
--
-- The next record read from relation "RelationName", in any form
-- (i.e. ReadRecord, ReadRecordP, etc.), will be read locked.
-- This will prohibit any other user from reading or rewriting the
-- next record read. To unlock the record either "ReWrite", "Delete"
-- or "UnlockRecord" the record.
--
-- When the read operation is attempted it will try for "LockTimeOut"
-- seconds to read with lock. If it times out, a sage error will be
-- set. If "LockTimeOut" is 0 it will wait forever.
--
-- The record lock that occurs as a result of the next read will be
-- un-preemptable for either "PreemptTimeOut" seconds or
-- "SysRecordPreemptTimeOut" seconds, whichever is shorter.
--
-- CALLING SEQUENCE -
--
-- ReadLockRecord (RelationName, LockTimeOut, PreemptTimeOut);
--
-- ENTRY -
--
-- RelationName : string
-- The name of the relation whose record is to be locked.
--
-- LockTimeOut : ModSys.S_Natural
-- The time in seconds to try to read with lock.
--
-- PreemptTimeOut : ModSys.S_Natural
-- The time in seconds to not allow lock preempting.
--
-- EXIT -
--
-- Sage error is set if "RelationName" is invalid or the relation
-- "RelationName" has a record locked.
--
procedure ReadLockRelation
(RelationName : in string;
LockTimeOut : in ModSys.S_Natural;
PreemptTimeOut : in ModSys.S_Natural);
--*
-- ReadLockRelation - Read lock an entire relation.
--
--
-- The relation "RelationName" is read locked. This will prohibit
-- any other user from reading, rewriting or writing any records in
-- the relation.
--
-- The procedure will try for "LockTimeOut" seconds to lock the
-- relation. The procedure waits for all record locks to end before
-- granting the relation lock. If it times out, a SageError will be set.
-- If "LockTimeOut" is 0 it will wait forever.
--
-- The relation lock will be un-preemptable for either "PreemptTimeOut"
-- seconds or "SysRelationPreemptTimeOut" seconds, whichever
-- is shorter.
--
-- CALLING SEQUENCE -
--
-- ReadLockRelation (RelationName, LockTimeOut, PreemptTimeOut);
--
-- ENTRY -
--
-- RelationName : string
-- The name of the relation to be locked.
--
-- LockTimeOut : ModSys.S_Natural
-- The time in seconds to try to lock.
--
-- PreemptTimeOut : ModSys.S_Natural
-- The time in seconds to not allow lock preempting.
--
-- EXIT -
--
-- Sage error is set if "RelationName" is invalid or the relation
-- "RelationName" is already locked.
--
procedure ReadRecord
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations);
--*
-- ReadRecord - Read a record of a relation.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure ReadRecordA
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations;
Alpha : in string);
--*
-- ReadRecordA - Read a record with an alpha field.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure ReadRecordF
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations;
RealVal : in ModSys.S_Float);
--*
-- ReadRecordF - Read a record with a floating point field.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure ReadRecordI
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations;
NumberValue : in ModSys.S_Integer);
--*
-- ReadRecordI - Base ReadRecordI overloaded to handle Modsys.S_Integer.
--
-- See ReadRecordI declaration above for details.
--
procedure ReadRecordI
(Relation : in string;
Field : in string;
Operation : in Sage.SageOperations;
NumberValue : in ModSys.S_Natural);
--*
-- ReadRecordI - Base ReadRecordI overloaded to handle Modsys.S_Natural.
--
-- See ReadRecordI declaration above for details.
--
procedure ReadRecordN
(Relation : in string;
Field : in string;
Number : in ModSys.S_Natural);
--*
-- ReadRecordN - Read record of a relation by index number.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure ReadRecordP
(Relation : in string;
Field : in string;
Number : in ModSys.S_Natural);
--*
-- ReadRecordP - Read record of a relation by physical record number.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure ReadRecordR
(Relation1 : in string;
Field1 : in string;
Operation : in Sage.SageOperations;
Relation2 : in string;
Field2 : in string);
--*
-- ReadRecordR - Read a record of a relation.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
function RelationIsOpen
(RelationName : in string) return boolean;
--*
-- RelationIsOpen - Check to see if relation is open.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
function RelationOpenForModify
(Relation : in string) return boolean;
--*
-- RelationOpenForModify - Check to see if relation is opened for modify.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure ReWriteRecord
(Relation : in string);
--*
-- ReWriteRecord - ReWrite a record of a relation.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
function RecordIsWriteLocked
(Relation : in string) return boolean;
--*
-- RecordIsWriteLocked - The record has a write lock.
--
-- This function returns a true if a write permission lock is
-- currently in place. This could be if:
-- 1. A record write lock was requested on a record and has not
-- been preempted.
-- 2. An exclusive read or write lock is in force for the relation.
-- 3. Locking has been turned off
--
procedure SetRecordPreemptTime
(Seconds : in ModSys.S_Natural);
--*
-- SetRecordPreemptTime - Set default record preempt time.
--
--
-- The system default record preempt time is set to "Seconds".
--
-- This value sets the upper limit on the preempt time for
-- record locks. The default is 30 seconds.
--
-- CALLING SEQUENCE -
--
-- SetRecordPreemptTime (Seconds);
--
-- ENTRY -
--
-- Seconds : ModSys.S_Natural
-- The number of seconds to set the record preempt time limit to.
--
procedure SetRelationPreemptTime
(Seconds : in ModSys.S_Natural);
--*
-- SetRelationPreemptTime - Set default relation preempt time.
--
--
-- The system default relation preempt time is set to "Seconds".
--
-- This value sets the upper limit on the preempt time for
-- relation locks. The default is 30 seconds.
--
-- CALLING SEQUENCE -
--
-- SetRelationPreemptTime (Seconds);
--
-- ENTRY -
--
-- Seconds : ModSys.S_Natural
-- The number of seconds to set the relation preempt time limit to.
--
procedure SetToSystemNumber
(systemNumber : in ModSys.S_Natural);
--*
-- SetToSystemNumber - Select the current system by number.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure SetUserID
(NewUserID : in string);
--*
-- SetUserID - Set the User ID.
--
--
-- The current value of the UserID is set.
--
-- CALLING SEQUENCE -
--
-- SetUserID (NewUserID);
--
-- ENTRY -
--
-- NewUserID : string
-- A three-character array.
--
function TotalRecords
(relName : in string) return ModSys.S_Natural;
--*
-- TotalRecords - Return the total records used by the relation.
--
-- (Refer to the documentation for the same function in the Sage package).
--
procedure TruncateBlock
(Relation : in string;
Field : in string;
firstByte : in out ModSys.S_Natural);
--*
-- TruncateBlock - Shorten the size of a current block of data.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure UnlockRecord
(RelationName : in string);
--*
-- UnlockRecord - Unlock a pending record lock.
--
--
-- If the relation "RelationName" has a record locked then the record is
-- unlocked. No data base update is associated with this operation.
--
-- CALLING SEQUENCE -
--
-- UnlockRecord (RelationName);
--
-- ENTRY -
--
-- RelationName : string
-- The name of the relation whose record is to be unlocked.
--
-- EXIT -
--
-- Sage error is set if "RelationName" is invalid, the relation
-- "RelationName" has no record locked, or the record lock timed out.
--
procedure UnlockRelation
(RelationName : in string);
--*
-- UnlockRelation - Unlock an entire relation.
--
--
-- The relation "RelationName" is unlocked.
--
-- CALLING SEQUENCE -
--
-- UnlockRelation (RelationName)
--
-- ENTRY -
--
-- RelationName : string
-- The name of the relation to lock.
--
-- EXIT -
--
-- Sage error is set if "RelationName" is invalid, the relation
-- "RelationName" is not locked, or the lock timed out.
--
procedure WriteLockRecord
(RelationName : in string;
LockTimeOut : in ModSys.S_Natural;
PreemptTimeOut : in ModSys.S_Natural);
--*
-- WriteLockRecord - Cause next record read to be write locked.
--
--
-- The next record read from relation "RelationName", in any form
-- (i.e. ReadRecord, ReadRecordP, etc.), will be write locked.
-- This will prohibit any other user from rewriting the
-- next record read. To unlock the record either "ReWrite", "Delete"
-- or "UnlockRecord" the record.
--
-- When the read operation is attempted it will try for "LockTimeOut"
-- seconds to read with lock. If it times out a sage error will
-- be set. If "LockTimeOut" is 0 it will wait forever.
--
-- The record lock that occurs as a result of the next read will be
-- un-preemptable for either "PreemptTimeOut" seconds or
-- "SysRecordPreemptTimeOut" seconds, whichever is shorter.
--
-- CALLING SEQUENCE -
--
-- WriteLockRecord (RelationName, LockTimeOut, PreemptTimeOut);
--
-- ENTRY -
--
-- RelationName : string
-- The name of the relation whose record is to be locked.
--
-- LockTimeOut : ModSys.S_Natural
-- The time in seconds to try to read with lock.
--
-- PreemptTimeOut : ModSys.S_Natural
-- The time in seconds to not allow lock preempting.
--
-- EXIT -
--
-- Sage error is set if "RelationName" is invalid or the relation
-- "RelationName" has a record locked.
--
procedure WriteLockRelation
(RelationName : in string;
LockTimeOut : in ModSys.S_Natural;
PreemptTimeOut : in ModSys.S_Natural);
--*
-- WriteLockRelation - Write lock an entire relation.
--
--
-- The relation "RelationName" is write locked. This will prohibit
-- any other user from rewriting or writing any records in the relation.
--
-- The procedure will try for "LockTimeOut" seconds to lock the
-- relation. If it times out a sage error will be set. If "LockTimeOut"
-- is 0 it will wait forever.
--
-- The relation lock will be un-preemptable for either "PreemptTimeOut"
-- seconds or "SysRelationPreemptTimeOut" seconds, whichever
-- is shorter.
--
-- CALLING SEQUENCE -
--
-- WriteLockRelation (RelationName, LockTimeOut, PreemptTimeOut);
--
-- ENTRY -
--
-- RelationName : string
-- The name of the relation to be locked.
--
-- LockTimeOut : ModSys.S_Natural
-- The time in seconds to try to lock.
--
-- PreemptTimeOut : ModSys.S_Natural
-- The time in seconds to not allow lock preempting.
--
-- EXIT -
--
-- Sage error is set if "RelationName" is invalid or the relation
-- "RelationName" is already locked.
--
procedure WriteRecord
(Relation : in string);
--*
-- WriteRecord - Write a record of a relation.
--
-- (Refer to the documentation for the same procedure in the Sage package).
--
procedure GetMaxUsers
(maximumUsers : out ModSys.S_Natural);
procedure SetMaxUsers
(maximumUsers : in ModSys.S_Natural);
Send mail to
warren.merrill@inl.gov
with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance