Function API ListingThis document lists the c-tree Plus Function API broken into functional groupings as follows:Each of these categories are described below.To view the list alphabetically, click here.Initialization APIThe initialization API prepares the environment for c-tree Plus operation. Included are the ctThrd, Instance Control, ISAM Initialization, and Low-level Initialization API's.ctThrd API: The c-tree Plus ctThrd API is a very thin overlay over the native threading API for each operating systems. Only systems without native threading use a c-tree Plus proprietary threading API.ctThrdAttach Make an existing thread c-tree Plus compatible.ctThrdBlockCls Close a block.ctThrdBlockGet Get a thread block.ctThrdBlockInit Initialize memory for a thread block.ctThrdBlockRel Releases a block.ctThrdBlockWait Wait for a block to clear.ctThrdCreate Create a c-tree Plus thread.ctThrdData Returns a pointer to a private data area.ctThrdDataSet Set a pointer to a private data area.ctThrdDetach Clean up the c-tree Plus compatibility created with ctThrdAttach.ctThrdExit Clean up thread.ctThrdHandle Returns a thread identifier.ctThrdInit Initialize thread management.ctThrdLIFOWrite Write a message at the beginning of a queue.ctThrdMutexCls Closes a mutex.ctThrdMutexGet Acquires a mutex.ctThrdMutexInit Initialize memory for a mutex.ctThrdMutexRel Releases a mutex.ctThrdMutexTry Try to acquire mutex immediately.ctThrdQueueClose Close a message queue.ctThrdQueueCount Returns the number of entries in a queue.ctThrdQueueMlen Returns the length of the message at the beginning of a queue.ctThrdQueueOpen Open a message queue.ctThrdQueueRead Read a queue message.ctThrdQueueReadDirect Read a queue message pointer.ctThrdQueueWrite Write a queue message.ctThrdQueueWriteDirect Write a queue message pointer.ctThrdSemapCls Close a semaphore.ctThrdSemapGet Get one unit of a semaphore.ctThrdSemapInit Initialize a semaphore.ctThrdSemapRel Release one unit of a semaphore.ctThrdSemapTry Try once to get one unit of a semaphore.ctThrdSleep Sleep a thread for a given time.ctThrdTerm Terminate threading support.Instance Control API: Similar to the thread API but used only with single-thread models, Instance Control allows and controls multiple c-tree Plus instances within a single application.GetCtreePointer Return a pointer to a c-tree Plus state variable structure (CTG- VAR).NextCtree Change to the next registered c-tree Plus instance.RegisterCtree Register (establish) a c-tree Plus instance.SwitchCtree Switch to a specific c-tree Plus instance.UnRegisterCtree Unregister a c-tree Plus instance.WhichCtree Return the current c-tree Plus instance reference name.ISAM Initialization API: Used to initialize the ISAM level operation of c-tree Plus.CloseIFile Incremental ISAM close.CloseISAM Close all ISAM files.CloseRFile Incremental ISAM close for files opened by Resource IFIL open.InitISAM Initialize file structures and index buffer area.InitISAMXtd Initialize file structures and index buffer area (extended version).OpenFileWithResource Incremental ISAM open, based on the IFIL Resource.OpenFileWithResourceXtd Initialize file structures and index buffer area.OpenIFile Incremental ISAM open.OpenIFileXtd Extended Incremental ISAM open.OpenISAM Open all the ISAM files.OpenISAMXtd Open all the ISAM files (extended version).Low-level Initialization API: Used to initialize the low-level c-tree Plus environment.CloseCtFile Close index or data file.InitCTree Initialize file structures and index buffer area.InitCTreeXtd Initialize file structures and index buffer area (extended version).OpenCtFile Open a data file.OpenCtFileXtd Extended data or index file open.Data Definition APIUsed to create and define tables and indices. Divided into ISAM and Low-level API's.ISAM Data Definition API: Used to create and define files for ISAM level use.CompactIFile Compresses a data file, then rebuilds to regenerate the indices.CompactIFileXtd Compresses a data file, then rebuilds to regenerate the indi- ces.CreateIFileXtd8 Extended 8 byte Incremental ISAM creation.CreateIFile Incremental ISAM create.CreateIFileXtd Extended Incremental ISAM creation.CreateISAM Create all the ISAM files.CreateISAMXtd Extended ISAM file creation routine.DeleteIFile Delete ISAM file and associated indices.DeleteRFile Delete ISAM file and associated indices.DropIndex Permanent Incremental Index deletion.GetConditionalIndex Get the Conditional Index Resource from a data file.GetDODA Retrieve information from a record schema stored as a resource.GetIFile Retrieve an IFIL structure from a data file.GetXtdKeySegmentDef Retrieves the requested extended key segment defini- tion.PermIIndex Permanent Incremental Index creation.PermIIndex8 Permanent 8 byte Incremental Index creation.PutDODA Store information from a record schema as a resource.PutIFile Place an IFIL structure into a data file resource record.PutIFileXtd Place an IFIL structure into a data file resource record. (Extended version)PutIFileXtd8 Put an IFIL structure into a data file resource record. Extended 8 byte version.PutXtdKeySegmentDef Defines an extended key segment for a Server, an application, a data file, an index file, or a particular index segment.RebuildIFile Incremental ISAM rebuild.RebuildIFileXtd Extended Incremental ISAM rebuild.RebuildIFileXtd8 Extended 8 byte Incremental ISAM rebuild.RebuildIIndex Rebuilds a single index.RenameIFile Atomically rename some or all of the files associated with the IFIL structure.RenameIFileXtd Rename ISAM files, extended version.TempIIndexXtd Temporary Incremental Index creation.TempIIndexXtd8 Extended 8 byte temporary Incremental Index creation.TransformXtdSegment Creates a binary sort key (segment) using an extended key segment definition.UpdateConditionalIndex Update the Conditional Index Resource in a data file.Low-level Data Definition API: Used to create and define files for Low-level use.CreateDataFile Create a data file.CreateDataFileXtd Extended data file creation.CreateDataFileXtd8 Extended 8 byte data file creation.CreateIndexFile Create an index file.CreateIndexFileXtd Extended index file creation.CreateIndexFileXtd8 Extended 8 byte index file creation.CreateIndexMember Create an additional index file member.DeleteCtFile Delete c-tree Plus file.GetAltSequence Retrieve information from a data file relating to an alternate collating sequence that has been stored as a Resource.GetCtFileInfo Retrieve information from a file header.GetSuperFileNames Retrieve superfile member name.RenameFile Rename a file.SetAlternateSequence Establishes an Alternate Collating Sequence for an index file.SetFileSegments Segmented file support configuration function.SetVariableBytes Change the values used for key padding and as a field delim- iter in key construction.UpdateFileMode Changes critical file mode attributes such as the level of trans- action control.UpdateHeader Update the header portion of a c-tree Plus file.Data Manipulation APIData manipulation functions are used to alter the contents of data and index files. This sections is divided into ISAM and Low-level functions.ISAM Data Manipulation API: ISAM Manipulation functions are divided into general, Batch, Context, and Set APIs.AddRecord Add a new fixed-length data record and corresponding key values to ISAM files.AddVRecord Add a new variable-length data record, and its corresponding key values, to ISAM files.CurrentFileOffset Returns the byte position, (file address or offset), of the cur- rent ISAM record for the specified file.CurrentISAMKey Create an ISAM key from the current ISAM record.DeleteRecord Delete current fixed length ISAM record.DeleteVRecord Delete current variable length ISAM record.FirstRecord Read the first data record.FirstVRecord Read the first variable-length data record.GetGTERecord Read the record with key greater than or equal to target.GetGTEVRecord Read the variable-length record with key greater than or equal to target.GetGTRecord Read the record with key greater than target.GetGTVRecord Read the variable-length record with key greater than target.GetLTERecord Read the record with key less than or equal to target.GetLTEVRecord Read the variable-length record with key less than or equal to target.GetLTRecord Read the record with key less than target.GetLTVRecord Read the variable-length record with a key less than target.GetRecord Get data record with key equal to target value.GetSymbolicNames Retrieve symbolic information about file.GetVRecord Read the variable-length record with a key equal to target.LastRecord Read the last data record.LastVRecord Read the last variable-length data record.LockISAM Enable, free or suspend data record locks.NbrOfRecords Get the number of active records in fixed length data file.NextRecord Read the next data record.NextVRecord Read the next variable-length data record in the data file.PreviousRecord Read the preceding data record.PreviousVRecord Read the previous variable-length data record in the data file.ReadIsamData ISAM read data at record position.ReadIsamVData ISAM read variable-length data at record position.ReReadRecord Reread current ISAM record.ReReadVRecord Reread variable-length ISAM data record.ResetRecord Updates the current ISAM record image buffers.ReWriteRecord Rewrite current fixed-length ISAM record.ReWriteVRecord Rewrite current variable-length ISAM record.SetRecord Resets the current ISAM record.TransformKey Perform key segment translation to target key.uTFRMKEY Undo key segment translation to target key.VRecordLength Get length of current variable length ISAM record.Batch API: Manipulate batches of records in a single call.AllocateBatch Optionally allocates buffer space for multiple batches (groups of records).ChangeBatch Change current batch (group of records).DoBatch Perform operations on a group of records.FreeBatch Free space allocated for multiple batches (groups of records).FreeBatchNbr Free space allocated for a specific batch.Context API: Maintain separate positions in a file.ChangeISAMContext Change current ISAM context.CloseISAMContext Close current ISAM context.OpenISAMContext Opens (creates) an ISAM context.Sets API: Work with a specified subset of a table's records.AllocateSet Optionally allocates buffer space for multiple sets.ChangeSet Change current set.FirstInSet Read the first data record in the set defined by target.FirstInVSet Read the first variable-length data record in the set defined by tar- get.FreeSet Free space allocated for multiple sets.FreeSetNbr Free space allocated for a specific set.LastInSet Read the last data record in the set defined by a target.LastInVSet Read the last variable-length data record in the set defined by tar- get.NextInSet Read the next data record in the set defined by target.NextInVSet Read the next variable-length data record in the set defined by tar- get.PositionSet Establish current ISAM record as current position in set.PositionVSet Establish current variable-length ISAM record as current position in set.PreviousInSet Read the previous data record in the current key value set.PreviousInVSet Read the previous variable-length data record in the set defined by target.Low-level Data Manipulation API: Manipulate data and index files at the low level.AddKey Add key value to index file.BuildKey Perform key segment translation from record buffer to target key.ctGETHGH Retrieve the high-order four bytes of an 8 byte record address.ctSETHGH Set the high-order four bytes of an 8 byte record address.CurrentLowLevelKey Get a key from the current low-level key buffer.DeleteKey Delete key value verifying associated data record position.DeleteKeyBlind Delete key value when associated data record position is not known.EstimateKeySpan Find the approximate number of entries between two key val- ues.FirstKey Find the first entry in an index file.GetGTEKey Search index file for entry equal to or greater than target.GetGTKey Search index file for entry greater than target.GetKey Search index file for entry equal to target value.GetLTEKey Search index file for entry equal to or less than target.GetLTKey Search index file for entry less than target.GetORDKey Return the record offset (recbyt) to the nth offset past the given target.KeyAtPercentile Find key value located at about the given percentile.LastKey Find the last entry in an index file.LoadKey Add key value to index file in presorted order.LockCtData Lock / unlock data records.NbrOfKeyEntries Number of entries in index file.NbrOfKeysInRange Return the number of active index entries found between two targets.NewData Get next available fixed length data record position.NewVData Get next available fixed length data record position.NextKey Find the next entry in an index file.PreviousKey Find the previous entry in an index file.ReadData Read fixed-length data record.ReadVData Read variable length data record.ReleaseData Release fixed-length data record for reuse.ReleaseVData Release variable-length data record for reuse.SetDataFilter Specify a data filter for a given data file.TransformSegment Low-level key transformation.VDataLength Get length of variable-length data record.WriteData Write fixed-length data record.WriteVData Write variable length data record.Utility FunctionsThe following functions provide capabilities that do not fit into the categories above. In addition to general utility functions, Server administration and Transaction Processing control functions are included here.