_define Utility - Define File

Syntax

call "_define"

Description

The _define program defines a BBx file. INDEXED, SERIAL, DIRECT, SORT, STRING, PROGRAM, MKEYED, C-ISAM (PRO/5 only), and XKEYED (BBj only) files can be defined.

Depending on the type of file defined, determine the following values to define the file:

Key Size

Any size from 1 to 64.

Record Size

Any size from 1 to 32767.

Number of Records

Any number as long as file size does not exceed (2^31)-1 bytes.

To define a SORT file, define a DIRECT file with a record size of 0.

When defining a multi keyed MKEYED file, the key definition contains the following:

Key

Description

Key #

Key segment number. It is 1 based and must be sequential. This does not prevent defining a multi-segment key. To define a multi-segment key, enter the same key number for all the parts.

Field #

Data field number. If the whole record should be used as one field, enter a 0; otherwise, enter the field number to use.

Position

Position in the record where the key begins – 1 based.

Length

Number of bytes in the key.

Descending

Yes/No entry that specifies whether the segment should be ascending or descending. The default is NO, which makes the segment ascending.

Once _define is given all the requested information, it asks if the information entered is correct. If answering "Y" will define the file, otherwise the file name prompt is displayed, and the information entered will be lost.

Related Files/Programs

_mkey.utl

_path.pub

_stdinp.pub

See Also

Alphabetical Utilities

Functional Listing of Utilities