CREATE-BFILE Command

The CREATE-BFILE command creates a file which is used for mvBASIC programs. CREATE-BFILE can create a dictionary file, a data file, a dictionary/data file pair, or an account. It has three formats. Use the first format to create both the dictionary and the data file at the same time; use the second format to create either the dictionary or the data file alone; use the third format to create an account. You can’t create a data file if the dictionary file does not already exist.

Format

CREATE-BFILE {filename | dict-name, data-name} dict-mod data-mod [(options)]

CREATE-BFILE {DICT | DATA} filename modulo [(options)]

CREATE-BFILE M/DICT account-name dict-mod [(options)]

Parameter(s)

filename

Name of the file.

account-name

Name of the account.

dict-name,data-name

Full name of the file. Use this format to create a data file that is one of multiple files associated with a single dictionary.

dict-mod

Modulo value of the dictionary.

data-mod

Modulo value of the data file.

DICT

Specifies the file dictionary.

DATA

Specifies the data file.

M/DICT

Specifies the system dictionary.

modulo

Modulo value of the dictionary or data file.

options

The following options are supported:

R

Creates a file in another account (SYS3 privileges required).

U

Creates a DU-type file.

X

Creates a DX-type file.

Y

Creates a DY-type file.

Z

Creates a DZ-type file.

Description

When using the above options, the X and Y options may not be specified together. If both dictionary and data files are created using either the X or Y option, only the data file is created as either a DX or DY file.

The R option specifies another account as the destination for the file being created; SYS3 privileges are required. If the R option is specified, the following prompt displays:

>Account:

Enter the name of an account (within the SYSTEM dictionary) in which the file being created will be stored. The account entered may have either a D-pointer or Q-pointer account definition.

The CREATE-BFILE command creates a File Definition item in the Master Dictionary. This item has a definition code of DC (Attribute 1). Source code for an mvBASIC program is stored as an item in the data file; when a program is compiled, a pointer to the object code is placed in the file dictionary.

Creating an mvBASIC File

The following rules apply for creating files:

If CREATE-FILE was used to create a normal data file and you want to change it to a DC type file, use the CHANGE-FILE to change line 1 from D to DC in the File Definition item in the Master Dictionary.

The following example creates a dictionary and a data file called BP for mvBASIC programs, with modulos of 23 and 401:

>CREATE-BFILE BP 23 401

[417]  FILE 'BP' CREATED; BASE = 25439, MODULO = 23

[417]  FILE 'BP' CREATED; BASE = 25462, MODULO = 401