Maintenance Methods |
Maintenance Methods are listed below:
Method |
Description |
Open(pathname$) |
Opens file whose historical file split information is to be edited/defined. |
AddSegment(pathname$[,condval$]) |
Creates a new active segment. This function automatically converts a non-split file into a split file when the first active segment is created. |
GetSegmentCount( ) |
Returns the number of segments/files (0 if not split). |
DropSegment(segment) |
Removes file/segment by Index. If removing the last segment, the file is reverted back to a non-splitting format. |
LockSegment(segment) |
Sets the specified segment as locked (no updates allowed). |
UnLockSegment(segment) |
Sets the specified segment as unlocked (updatable). Current/last added segment is always updatable and is where all new records will be placed. |
isSegmentLocked(segment) |
Returns true (non-zero) if specified segment is locked. Returns false if it is not locked. |
SetTestField(fieldDesc$) |
Defines the field to test when adding records. |
GetTestField$( ) |
Returns the field tested when adding records. Will return "" if not specified. |
SetSegmentTest(segment,condVal$) |
Changes conditional field test value(s). |
GetSegmentTest$(segment) |
Returns conditional field test value(s) for the given segment. |
SetSegmentPath(segment,NewPath$) |
Changes/renames pathname. |
GetSegmentPath$(segment) |
Returns pathname for the given segment. |
GetSegmentTime$(segment) |
Return the date/time that the given segment was added. The format is YYYY-MM-DD hh:mm:ss. |
GetKeySortSeq(keyno) |
Returns 1 if the specified key number is marked as Ascending, -1 if marked as Descending; otherwise, returns 0 (zero) if not specified. |
GetUniqueKey(keyno) |
Returns 1 if the specified key number is marked as being Unique in the file description. |
SetKeySortSeq(keyno,order) |
Sets the specified key as either Ascending (order=1), Descending (order=-1), or Unspecified (order=0). |