create-file Command

The create-file BASIC program creates a new dictionary and data file, a dictionary-only file, or a new data section on an existing dictionary file; space is allocated and reserved if available.

Syntax

create-file file.reference dict.modulo data.modulo {(options)}

create-file dict file.reference dict.modulo {(options)}

create-file data dictionary.reference,data.reference data.modulo {(options)}

Synonym(s)

cf

Parameter(s)

file.name

Name of the file to be created in the current account.

dict.name

Name of a dictionary to be created in the current account.

data.name

Name of a data file to be created in the specified dictionary.

dict.modulo

Indicates the number of frames to reserve in the primary file space for dictionary items.

data.modulo

Indicates the number of frames to reserve in the primary file space for data items. Any file can contain binary pointer items, so this code is not needed.

options  

f

Suppresses logging clear-file information in the file of files file by placing a c in attribute 17 of the file of files file item.

l

Logs any updates to this file to the transaction logger. This option is not compatible with the x or y options.

n

Negates all update protection for the given file irrespective of the global update protection setting. This option is not compatible with the u option.

p

Primary file space is to contain only pointer (indirect) items regardless of item length. Pointer-files are not supported in the FSI.

s

Item-IDs are case-sensitive. This option is compatible with all other options.

r

Allows the creation of a file in another account. When this option is used, the system prompts for the account the file is to be created in.

u

Enables update protection for the given file irrespective of the global update protection setting. This option is not compatible with the u option.

x

Does not save the file on backups (file-save, account-save, and so on). The file does not exist after a file restore.

y

Does not save the data in this file on backups (file-save, account-save, and so on). On a file restore, the file is recreated, but empties.

These options above are included as part of the dictionary code in the file identification items in the master dictionary for dictionary files and in the file dictionary for data files.

The l, x, and y options can also be added or deleted from an existing dictionary code by using update or ud. The s code cannot be added or deleted

WARNING—

D3 allows separation to be indicated, but ignores it.

The path names to other accounts cannot be used. The syntax varies according to the section of the file being created. For example:

 First form creates a new file with both data and dictionary sections.

 Second form creates a new file with only a dictionary section.

 Third form creates a new data file section in an existing dictionary.

The internal modulos actually used may be slightly higher to give a more optimal hashing scheme.

When a dictionary-only file is created, a Q-pointer (synonym-defining item) with the file reference as its item-ID, is automatically created in the dictionary. This allows the file to be accessed without specifying dictionary.

Example(s)

create-file customers 7 101

Creates both a new dictionary and data section.

create-file dict pointer-file 31

Creates a dictionary-only file.

create-file data customers,archive 101

Creates a new data section called archive and places a pointer to it in the dictionary of customers. The new data section may now share all the attribute-defining items in the customers dictionary.

See Also

account-save Command

clear-file Command

conv-case Command

d/code

delete-file Command

file-save Command

Group

item Command

Linked Overflow

Modulo

move-file Command

Primary File Space

prime Command

save Command

Scrubber

txlog Command

txlog-status Command

update-logging Command