Refresh Table (RF)

Command title

Refresh Table


The RF command refreshes a Data Table that is opened for read in a TSR. Any Alternate Indexes for that Data Table that are opened for read will automatically be refreshed.

COBOL syntax               

MOVE 'RF'                   TO xxxx-COMMAND.

C syntax

memcpy( tbCommArea.tbCommand, "RF", 2 );
TBLBASE( &tbParm, &tbCommArea );




The Refresh command will refresh a table that is opened for read and all open Alternate Indexes in a TSR, from the latest generation of the table in the library. The table will always be refreshed even if it the currently open version is the latest version of the table. If the LIB-LIST is changed after the table has been opened, the refreshed version may be loaded from a different library. See Library search order and uniqueness of table names.

To minimize the time in which access to the table is restricted, the affected Data Table and any alternates are reloaded while accesses are continuing with the original open copy in the TSR. Only after the refreshed copy and any alternates are completely loaded, internal pointers are switched to the refreshed copy. Access is restricted for the instant the internal pointers are switched.

The RF command only works with a Data Table, not Alternate Indexes.

Return value

ERROR 0002 occurs when a refresh is attempted on a table that is not open.

ERRORs 0093 subcodes 1-7 occur when tableBASE discovers a difference in attributes of the current data table, or opened alternate of the table, with the refreshed version.

ERROR 0085 occurs if the RF command is attempted against an Alternate Index.

For the list of tableBASE error codes, see tableBASE return codes.


The RF command can also be invoked from the batch TBDRIVER (see TBDRIVER (DK1TDRV) commands). The batch TBDRIVER allows for the use of wildcards (see Table 74, Notes).


Only tables opened for read may be refreshed. If a table being refreshed is very large, there may not be adequate space in the TSR, as both the current version and the refresh version are resident in the TSR simultaneously. The maximum size table that can be refreshed is 1G, and only when the TSR size is 2G.

See also