tcl.create-file Verb: Access/TCL

tcl.create-file

Command tcl.create-file Verb: Access/TCL
Applicable release versions: AP, R83
Category TCL (746)
Description 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.

Path-names to other accounts may not be used. The syntax varies according to the section of the file being created.

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

The second form creates a new file with only a dictionary section.

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

"file.name" is the name of the file to be created in the current account.

"dict.name" is the name of a dictionary to be created in the current account.

"data.name" is the 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. See "primary file space".

"data.modulo" indicates the number of frames to reserve in the primary file space for data items.

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 dict.

"cf" is a short hand fro "create-file".
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)}
Options c This was an R83 option to make the file a "dc" type, indicating that the file would contain binary items (program libraries and list files). In AP, any file may contain binary pointer items, so this code is not needed.

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.

s Item-ids are upper/lower case-sensitive. This option is compatible with all other options.

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

x Does not save this file on "save-type" (file-save, account-save, etc.) backups. The file will not exist after a file restore.

y Does not save the data in this file on "save-class" (file-save, account-save, etc.) backups. On a file restore, the file is recreated, but will be empty.

The options are included as part of the "d/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 d/code by using "update" or "ud". The "s" code cannot be added or deleted.
Example
create-file customers 7 101 

This creates both a new dictionary and data section. 

create-file dict pointer-file 31

This creates a dictionary-only file.

create-file data customers,archive 101

This 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.
Purpose
Related tcl.file-save
tcl.move-file
tcl.update-logging
files
tcl.delete-file
tcl.txlog
tcl.save
d/code
modulo.def
tcl.prime
tcl.txlog-status
scrubber
tcl.conv-case
tcl.clear-file
tcl.create-file_rp
tcl.cf
primary.file.space
linked.overflow
tcl.account-save
tcl.create-bfile
tcl.item
group