====== Native Tables ====== ==== Cursors ==== ^Command^Description^ |[[activate_save_select|Activate_Save_Select subroutine]]|Loads a saved list of keys into cursor 0.| |[[clearselect|ClearSelect statement]]|Sets the list of record keys for a specified cursor to null.| |[[delete_save_select|Delete_Save_Select subroutine]]|Erases a saved list of keys.| |[[make.list|Make.List subroutine]]|Creates an active select list of keys from the passed list of keys.| |[[readnext|ReadNext]], [[readnext_by|ReadNext...By statements]]|Reads the next row key from a selected list (cursor) into a variable. The By option allows you to read the list bi-directionally.| |[[reduce|Reduce subroutine]]|Specify selection criteria for a cursor.| |[[rlist|Rlist routine]]|The processing module for OpenList queries, Rlist takes the OpenList statement.| |[[save_select|Save_Select subroutine]]|Saves an active select list of keys from cursor 0. The saved list can later be re-activated using Activate_Save_Select.| |[[select|Select]], [[select_by|Select...By statements]]|Makes each row key in a table available to the ReadNext statement in a select list. The By option allows you to access multiple select lists (cursors), and to specify sort criteria for the key list.| ==== Dictionary Interface ==== Dictionary interface commands allow you to access data in tables via the dictionary from within a BASIC+ procedure. ^Command^Description^ |[[Braces_operator|{}]]|Retrieves the value of a column from the current row. The current row is defined as that stored in the variable @RECORD, with the item id stored in @ID. The dictionary being accessed must previously have been opened to the dictionary file variable @DICT.| |[[calculate|Calculate()]]|Like the { } (braces) function, but can accept a variable in place of a column name. This permits a procedure to prompt for or otherwise determine which column to look up at execution time. Also requires access to @RECORD, @ID, and @DICT.| |[[compute_dict|Compute_Dict()]]|Returns the result of a dictionary calculation. This is a shell around the Calculate() function. It opens a dictionary to @DICT, sets @ID, reads @RECORD, and calls Calculate.| |[[create_symbolic|Create_Symbolic routine]]|Creates or redefines calculated (symbolic) columns in a native table dictionary.| |[[dict_depend|Dict_Depend()]]|Returns the column positions in a row that are required to perform a dictionary calculation.| |[[list_dict|List_Dict routine]]|Returns the column definitions for a specified dictionary.| ==== File I/O ==== File input and output (I/O) commands allow you to read from OpenInsight data files or to write data into them. ^Command^Description^ |[[clearfile|ClearFile statement]]|Deletes all rows from a table but leaves the table definition.| |[[clear_table|Clear_Table subroutine]]|Clears the data or dictionary information from a table without deleting the table. This subroutine does not allow you to clear system tables.| |[[copy_os_to_row|Copy_OS_To_Row routine]]|Copies one or more operating system files to OpenEngine.| |[[copy_row|Copy_Row routine]]|Copies a row or a group of rows from one table to another.| |[[copy_row_to_os|Copy_Row_To_OS routine]]|Copies one or more OpenEngine rows to operating system files.| |[[delete_statement|Delete statement]]|Deletes a row from an opened table.| |[[delete_row|Delete_Row routine]]|Deletes one or more specified rows from a table. Since Delete_Row uses the Delete statement itself, it is more efficient to use the Delete statement in a BASIC+ script. The Delete_Row routine can be called from the command line, making it useful for deleting specific records or emptying a file.| |[[matread|MatRead statement]]|Reads a row from a table into a dimensioned array.| |[[matwrite|MatWrite statement]]|Writes a dimensioned array to a row in a table.| |[[open|Open statement]]|Opens a table for file I/O. Tables do not need to be closed. All I/O commands (except Xlate) use the file handle assigned by the Open statement.| |[[read|Read statement]]|Reads a file row from a table into a variable.| |[[read_column|Read_Column routine]]|Returns one or more columns from a row in a table.| |[[readnext|ReadNext]], [[readnext_by|ReadNext...By statements]]|Reads the next row key from a selected list (cursor) into a variable. The By option allows you to read the list bi-directionally.| |[[reado|ReadO statement]]|Read Only. Identical to Read except that the row request may be fulfilled from cache.| |[[readv|ReadV statement]]|Reads a single column into a variable from a row in a table.| |[[read_row|Read_Row routine]]|Returns one or more rows from a table.| |[[write|Write statement]]|Writes a row to a table.| |[[write_column|Write_Column routine]]|Writes one or more columns to a specified row in a table.| |[[write_row|Write_Row routine]]|Writes one row to a specified table.| |[[writev|WriteV statement]]|Writes a single column to a row in a table.| |[[xlate|Xlate()]]|Extracts the value of a particular column in a particular row in a table.| ==== Index ==== |[[btree.extract|Btree.Extract subroutine]]|Searches one or more Btree indexes for data matching the search criteria passed in. Returns the keys to rows having matching data.| |[[collect|Collect.IXVals()]]|Returns the list of index values for the specified indexed field in the specified file.| |[[create_index|Create_Index subroutine]]|Creates a Btree, Cross Reference, or Relational index for a specified column in a table.| |[[delete_index|Delete_Index subroutine]]|Removes a Btree, Cross Reference, or Relational index from a specified column in a table.| |[[extract_si_keys|Extract_SI_Keys subroutine]]|Searches a Btree index for a specified value and returns a list of keys based on the search value.| |[[get_si_values|Get_SI_Values routine]]|Returns all indexed values from the index for a column.| |[[list_index|List_Index routine]]|Returns information about indexes for a specified table or for all tables.| |[[set_bgnd_ix_time|Set_Bgnd_IX_Time()]]|Sets the number of seconds the engine waits before and between indexing. This function is used with Set_IDXSvr() to control dedicated indexing.| |[[set_fserror|Set_FSError()]]|Transfers @FILE.ERROR to the value returned by Get_Status().| |[[set_idxsvr|Set_IDXSvr()]]|Toggles the dedicated indexing mode. To turn dedicated indexing on, pass 1; to turn dedicated indexing off, pass 0 (zero).| |Update_Index subroutine|Updates or rebuilds indexes in a specified column or for all columns in an attached table.| ==== Networking ==== Networking commands enable a BASIC+ procedure to set and clear row and table locks in a networking environment. ^Command^Description^ |[[lock|Lock statement]]|Sets a lock for a specified row. If the lock is held by another user, the lock fails and branches to Else logic.\\ \\ **Note:** A Read or Write will not check a lock. Only a lock can determine whether a lock has been set.| |[[unlock|UnLock statement]]|Releases a lock set by the Lock command.| ==== Routines ==== ^Command^Description^ |[[activate_save_select|Activate_Save_Select subroutine]]|Loads a saved list of keys into cursor 0.| |[[alias_table|Alias_Table subroutine]]|Creates a temporary synonym (an alias) for an existing table. The permanent database definition is not altered.| |[[attach_table|Attach_Table subroutine]]|Temporarily includes a table in the database definition. To make this permanent, run Define_Database, or use Database Manager.| |[[collect|Collect.IXVals()]]|Returns the list of index values for the specified indexed field in the specified file.| |[[control_off|Control_Off routine]]|Removes transaction and domain validation controls from Native Tables.| |[[control_on|Control_On routine]]|Installs transaction and domain validation controls for a table.| |[[copy_row|Copy_Row routine]]|Copies a row or a group of rows from one table to another.| |[[copy_table|Copy_Table subroutine]]|Copies a native table, the dictionary for the table, and indexing information if it exists, to a new name or location. The source and target table must be the same filing system type.| |[[create_table|Create_Table subroutine]]|Creates native tables and their dictionaries.| |[[define_database|Define_Database subroutine]]|Defines a database, using all currently attached tables.| |[[delete_save_select|Delete_Save_Select subroutine]]|Erases a saved list of keys.| |[[delete_table|Delete_Table subroutine]]|Deletes native tables and their dictionaries.| |[[delete_user|Delete_User subroutine]]|Removes a user from the current database. Only the administrative user can delete users.| |[[detach_table|Detach_Table subroutine]]|Temporarily prevents access to a single table or list of tables by removing them from the current database. The permanent database definition is not altered.| |[[fix_lh|Fix_LH subroutine]]|Compresses overflow in a table; fixes Group Format Errors (GFEs); increments, decrements, resizes the sizelock for a table; defines a new threshold for a linear hash (OpenInsight) table.| |[[get_env|Get_Env routine]]|Returns an attribute or list of attributes from the database environment for the current database.| |[[get_reccount|Get.RecCount()]]|Returns the number of rows in a table.| |[[get_si_values|Get_SI_Values routine]]|Returns an attribute or list of attributes from the database environment for the current database.| |[[list_dict|List_Dict routine]]|Returns the column definitions for a specified dictionary.| |[[list_index|List_Index routine]]|Returns information about indexes for a specified table or for all tables.| |[[list_keys|List_Keys routine]]|Returns a list of keys from a currently attached table.| |[[list_tables|List_Tables routine]]|Returns the attached tables in the current database.| |[[list_users|List_Users routine]]|Returns information about the users in a specified database.| |[[list_volume|List_Volume routine]]|Returns information about the tables in a specified volume.| |[[lock_routine|Lock routine]]|Provides a method for coordinating access to tables, rows, or columns by setting locks.| |[[make.list|Make.List subroutine]]|Creates an active select list of keys from the passed list of keys.| |[[rowexists|RowExists()]]|Determines whether all rows specified in a rowlist are in the specified table.| |[[save_env|Save_Env routine]]|Saves the environment settings specified in the Set_Env system stored procedure, for the current database.| |[[save_select|Save_Select subroutine]]|Saves an active select list of keys from cursor 0. The saved list can later be re-activated using Activate_Save_Select.| |[[set_env|Set_Env routine]]|Defines the value of an environment attribute or list of attributes for the current database.| |Set_MFS subroutine|Programmatically attach Modifying Filing Systems (MFS) to specified tables.| |[[tableexists|TableExists()]]|Determines whether the table specified exists in the current database.| |[[validate|Validate routine]]|Validates and converts data passed to the engine based on a specified validation pattern.| |[[verify_lh|Verify_LH subroutine]]|Tests linear hash tables, and stores statistical information about data distribution and space utilization for a table or tables. Verify_LH also diagnoses group format errors (GFEs).| |[[write_row|Write_Row routine]]|Writes one row to a specified table.| |[[xref|XREF subroutine]]|Reviews a string and divides it into "words," the boundaries of which are determined by delimiters you specify. XREF will exclude words according to a stop list or include words according to a go list.|