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.

WARNING

It is recommended that you familiarize yourself with the File Naming Conventions before using this command.

 

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.

NOTE— The maximum allowed modulo for a file in the VME is 16777213.

options

d

Creates the file in an alternate directory.

e

Specifies to encrypt the data in the file being created. See encrypt-file Command for more information.

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

Specifies that any updates to this file are logged 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.

q

Prevents files from being resized. This allows sequential commands (for example, count) to be used without having to update the File Control Block.

WARNING Administrators should not clear the q d-code and start a resize unless you are certain that there are no sequential operations in progress on the file.  See the u option of the resize Command for a description of the potential problems that may occur.

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.

s

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

t

Specifies that any updates to this file are not logged to the transaction logger.

u

Enables update protection for the given file irrespective of the global update protection setting. This option is not compatible with the n 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.

The 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:

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)

Creates both a new dictionary and data section.

create-file customers 7 101

Creates a dictionary-only file.

create-file dict pointer-file 31

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.

create-file data customers,archive 101

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