EXPAND library command

The EXPAND command increases the size of a library. This operation performs a block-by-block copy of the original contents. Whenever the tableBASE library size needs to be changed, a new library must be allocated and initialized, and the contents of the old one copied into it using the EXPAND command. The original tableBASE library may then be deleted.

Unlike the COPY command, which modifies the date/time stamp for each table to the time of the copy operation, this command copies the LIB library to the NEWLIB library leaving the date/time stamps at the original table creation setting.


NEWLIB=(library name)
LIB=(library name);

Required keyword


The contents of tableBASE library (LIB) will be copied to tableBASE library NEWLIB without a change to the date/time stamp.

The target library must be initialized and emptied by using, for example, the TBEXEC DEFINE library command.

Both datasets (LIB and NEWLIB) must have a DISP of OLD.

The default value for LIB is MAINLIB, unless overridden by a SET command.

In Version 6 the EXPAND command can increase the size of the NEWLIB’s internal free-space directory. In previous versions, the EXPAND command could not increase the size of the NEWLIB’s internal free-space directory.

Once converted, Version 6 format libraries may be expanded. However, expansion will mean that they can no longer be converted back to the Release 5.x format.
tableBASE Version 6 libraries are not compatible with previous releases. For more information see Appendix B of the tableBASE Installation Guide.