tcl.create-file

Verb: Access/TCL, Releases: AP and R83

Creates a new 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)}

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

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.

See Also

Command Name Type Description
tcl.file-save Verb: Access System backup process.
tcl.move-file Verb: Access Moves file.
tcl.update-logging Verb: Access Toggles transaction log or displays status.
files Definition Description of Pick file organization.
tcl.delete-file Verb: Access Deletes file from account.
tcl.txlog Verb: Access Invokes transaction logger menu.
tcl.save Verb: Access Invokes backup process.
d/code Attribute Defining Item References attribute 1 of current item.
modulo.def Definition The number of groups allocated as the primary space of a file.
tcl.prime Verb: Access Displays prime number.
tcl.txlog-status Verb: Access Displays status of transcation logger.
scrubber Definition a mechanism on certain older AP releases to provide overflow protection in the event of a system halt.
tcl.conv-case Verb: Access Converts item-ids to upper/lower case.
tcl.clear-file Verb: Access Clears dict or data section of specified file.
tcl.create-file_rp Verb: Access Adds file.
tcl.cf Verb: Access Invokes 'create-file' command.
primary.file.space Definition The number of groups allocated to a file.
linked.overflow Definition Additional frames attached to a file's primary file space.
tcl.account-save Verb: Access Saves one account to magnetic media.
tcl.create-bfile Verb: Access Creates 'dc'-type file pointer for Pick/BASIC source and object code.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.