All of the file management commands are TCL-II commands. All recognize the same syntax for specifying a file.
A file name can:
Be any length up to 47 characters.
Be enclosed in parentheses or preceded by a left parenthesis to explicitly identify the token as a file name; however, the parenthesis is not required on the TCL command line.
A file name cannot:
Contain a blank space, a comma, a single or double quotation mark, or closed parentheses.
A command such as COPY requires you to use parentheses when specifying a file name in response to a destination prompt. However, though parentheses are seldom used, the fact that they are used explains why a file name should not begin with a left parenthesis or end with a right parenthesis.
A specified file must be defined in the Master Dictionary of the account. Each data file must have as its counterpart a dictionary file describing the nature of the data. Each file can be thought of as having two sections: a data section and a dictionary section. Both the dictionary and the data file contain items.
When the dictionary and the data file have the same name, only the name of the data file need be specified. When the user supplies a file name, the system looks in the account’s Master Dictionary for a File Definition item of the same name that identifies the dictionary. It then looks in the file dictionary to find a File Definition item that points to the data file. For example, when you specify the file name CUSTOMERS, the name of the dictionary is CUSTOMERS and the name of the data file is also CUSTOMERS.
The file management commands can be used to access the data file or the file dictionary independently. The following modifiers precede the file name:
DATA |
Specifies that only the data file is the target of processing. |
DICT |
Specifies that only the dictionary is the target of processing. |
DICT CUSTOMERS, for instance, refers to the dictionary of the CUSTOMERS file.
If a dictionary is shared by multiple data files, each data file can be accessed independently of the other data files associated with the dictionary. If the name of the data file that you want to access is different from the name of the dictionary, you must specify the name of the dictionary followed by the name of the data file. A comma (with no spaces on either side of it) must separate the name of the dictionary from the name of the data file.
In the following example, the syntax indicates that DAY-SHIFT is a data file associated with the dictionary PERSONNEL:
PERSONNEL,DAY-SHIFT |
A dictionary can exist without a data file. It is called a single-level file. The dictionary contains a Q-pointer that references itself, indicating that the items in the dictionary are the target of any operation. The Master Dictionary is a single-level file, which is why you do not have to specify DICT MD to access it.
See Also