The CREATE-FILE command can create a dictionary file, a data file, a dictionary/data file pair, or an account. It has three formats. Use the first format to create both the dictionary and the data file at the same time; use the second format to create either the dictionary or the data file alone; use the third format to create an account.
Format
CREATE-FILE {filename | dict-name, data-name} dict-mod data-mod [(options)] CREATE-FILE {DICT | DATA} filename modulo [(options)] CREATE-FILE M/DICT account-name dict-mod [(options)] |
Parameter(s)
filename |
Name of the file. |
|
account-name |
Name of the account. |
|
dict-name,data-name |
Full name of the file. Use this format to create a data file that is one of multiple files associated with a single dictionary. |
|
dict-mod |
Modulo value of the dictionary. |
|
data-mod |
Modulo value of the data file. |
|
DICT |
Specifies the file dictionary. |
|
DATA |
Specifies the data file. |
|
M/DICT |
Specifies the system dictionary. |
|
modulo |
Modulo value of the dictionary or data file. |
|
options |
The following options are supported: |
|
C |
Creates a DC-type file, indicating that the file can be used for BASIC programs. The dictionary usually contains items that are pointers to frames containing object code and the data file contains the source code. You can specify DCX and DCY. |
|
R |
Creates a file in another account (SYS3 privileges required). |
|
U |
Creates a DU-type file, indicating that file updates are not logged by the Update Logger. U may be specified with other options. |
|
X |
Creates a DX-type file, indicating that the file is not saved during a file-save. The file will not exist following a file-restore. |
|
Y |
Creates a DY-type file, indicating that only the file sizing parameters are saved, not its data, during a file-save. The file will be empty following a file-restore. |
|
Z |
Creates a DZ-type file, indicating that files will not be saved on a floppy disk. |
Description
When using the above options, the X and Y options may not be specified together. If both dictionary and data files are created using either the X or Y option, only the data file is created as either a DX or DY file. If both dictionary and data files are created using the C option, only the dictionary is created as a DC file.
The R option specifies another account as the destination for the file being created; SYS3 privileges are required. If the R option is specified, the following prompt displays:
>Account: |
Enter the name of an account (within the SYSTEM dictionary) in which the file being created will be stored. The account entered may have either a D-pointer or Q-pointer account definition.
When you create a dictionary, the CREATE-FILE processor creates a File Definition item in the Master Dictionary. When you create a data file, the processor places a File Definition item in the associated dictionary.
The following rules apply for creating files:
A valid file name cannot include a blank space, a parenthesis, a comma, a semicolon, or single or double quotes.
You must create the file dictionary before you create its associated data file; you cannot create a data file without an associated dictionary. You can, however, create the dictionary and the data file at the same time.
If you are creating a data file that is one of multiple files associated with a single dictionary, you must use the dict-name, data-name format when you name the data file. This makes the data file’s relationship to the shared dictionary explicit.
Creating a New Database
The following example creates a dictionary and a data file, both called INVENTORY, with respective modulos of 3 and 379:
>CREATE-FILE INVENTORY 3 379 [417] FILE 'INVENTORY' CREATED; BASE = 24739, MODULO = 3 [417] FILE 'INVENTORY' CREATED; BASE = 24742, MODULO = 379 |
Creating a Data File
The following example creates a data file called PARTS that is one of multiple files associated with the INVENTORY dictionary:
>CREATE-FILE DATA INVENTORY,PARTS 379 [417] FILE 'PARTS' CREATED; BASE=24821, MODULO=379 |
Creating a Dictionary
The following example creates a dictionary called ORDER that has a modulo of 3:
>CREATE-FILE DICT ORDER 3 [417] FILE 'ORDER' CREATED; BASE = 25167, MODULO = 3 |
Creating a Data File
The following example creates a data file called SALES that has a modulo of 57:
>CREATE-FILE DATA SALES 57 [417] FILE 'SALES' CREATED; BASE = 25170, MODULO = 57 |
The associated dictionary, also called SALES, must already exist.
The next example creates a data file called WEEKLY with a modulo of 57 that will be associated with the existing dictionary ORDER:
>CREATE-FILE DATA ORDER,WEEKLY 57 [417] FILE 'WEEKLY' CREATED; BASE = 25227, MODULO = 57 |
Creating an Account
The following example creates an Account called PAY that has a modulo of 3:
>CREATE-FILE M/DICT PAY 3 [417] FILE 'PAY' CREATED; BASE = 56692, MODULO = 3 |