access.file Modifier/Access: Verbs, basic.file Statement/BASIC Program, file Definition/General, file Definition/General

access.file

Command access.file Modifier/Access: Verbs
Applicable release versions: AP, R83
Category Access: Verbs (152)
Description
Syntax
Options
Example
Purpose
Related access.throwaway.connectives

basic.file

Command basic.file Statement/BASIC Program
Applicable release versions:
Category BASIC Program (486)
Description compiler directive to use attribute definition items in the file's dictionary while compiling the program.

Multiple files can be specified with the same statement, separated by commas. File paths are currently not allowed in the "file" statement.

The "file" statement is typically used to allow the use of attribute definition items to identify the attribute count ("ac") of the field and automatically apply dictionary correlative codes to the field value in the item.

When the Pick/BASIC compiler encounters a "file" statement, it opens the dictionary of the file specified by "file1", creates the executable code to open the data portion of the file during execution, scans the Pick/BASIC code for references to the given file and dimensions an array with the same name as the file specified.

The size of the dimensioned array is determined by the compiler. It scans through the program looking for references to attribute names as dimensioned array subscripts (e.g. file1(credit.limit)). After it has found all references to the given file, it takes the "highest" attribute count reference derived, adds 1 to it, and uses the resulting value as the size of the dimensioned array.

After an item is read from the file, attributes within the item may be referenced by using the attribute name from the associated dictionary as the array subscript. Correlative processing codes found in the file dictionary are executed, but output-conversions are not. Values within an attribute can be specified by appending a command and a value count to the attribute name or number.

"read" and "write" statements can not specify the file.variable when the array name "file1" is used as the variable.

The file pointer is assigned to the file.variable in the form "fv.file1" and references the data section of the file opened.
Syntax file file1 {, file2 ...}
Options
Example
file entity
id = "100"
read entity from id then
if entity(name) = "" then crt "no name!"
end

The file "entity" is bound by the "file" statement.  When 
item "100" is successfully read, the "name" field is 
checked. If the name field is null, "no name" is output to the 
terminal.

fv.entity = access(1)
if not(assigned(fv.entity)) then file entity

This determines if the file.variable "fv.entity" has been assigned by 
Access of the Update processor. If it has not been assigned, the 
"file" statement is executed. This technique is particularly useful 
when calling subroutines from Access, and prevents having to reopen a file each 
time the routine is called. Using this logic, the "file" statement is 
executed once.
Purpose
Related basic.open
basic.readnext
basic.read
basic.statements
file.reference
processing.codes
basic.matread
basic.default.files

file

Command file Definition/General
Applicable release versions: AP, R83
Category General (155)
Description description of Pick files.

Everything in the Pick data base is an item in a file.

File naming conventions:

Every item-id, filename, and account name abide by the same set of rules concerning valid and invalid characters. Pick provides an enormous amount of flexibility on how things are named.

It is easier to indicate which characters are NOT valid in account name's, filename's and item-id's than to individually explain which characters ARE valid:

The characters that should be avoided include:

space The space is a standard TCL command line delimiter.

quotes ("double quotes" and 'single quotes'). Quotes are used in the retrieval language to indicate literal values and specific item-id's.

backslash ("") The backslash behaves like quotes.

caret (^) The caret is used in the retrieval language as a "wildcard" character.

Left and right parenthesis ("()")
Parentheses are used to indicate that options follow.

Control characters
They don't print out and can cause all sorts of strange problems.

While the above list is not without exceptions, avoiding the use of these characters can prevent problems later.

Examples of valid item-id's:

S1000, abc-1898.1981, %g$1@*#
Syntax
Options
Example
Purpose
Related dictionaries
group
tcl.group

file

Command file Definition/General
Applicable release versions: AP, R83
Category General (155)
Description description of Pick files.

Everything in the Pick data base is an item in a file.

File naming conventions:

Every item-id, filename, and account name abide by the same set of rules concerning valid and invalid characters. Pick provides an enormous amount of flexibility on how things are named.

It is easier to indicate which characters are NOT valid in account name's, filename's and item-id's than to individually explain which characters ARE valid:

The characters that should be avoided include:

space The space is a standard TCL command line delimiter.

quotes ("double quotes" and 'single quotes'). Quotes are used in the retrieval language to indicate literal values and specific item-id's.

backslash ("") The backslash behaves like quotes.

caret (^) The caret is used in the retrieval language as a "wildcard" character.

Left and right parenthesis ("()")
Parentheses are used to indicate that options follow.

Control characters
They don't print out and can cause all sorts of strange problems.

While the above list is not without exceptions, avoiding the use of these characters can prevent problems later.

Examples of valid item-id's:

S1000, abc-1898.1981, %g$1@*#
Syntax
Options
Example
Purpose
Related dictionaries
group
tcl.group