File Definition Items

File Definition items are D-pointers that point to the location of a file. The file can be a single-level file, in which case it has no data-level file associated with it. The SYSTEM Dictionary and the Master Dictionary are two examples of single-level files. Most files, however, have two levels. In this case, the File Definition item points to a dictionary file which, in turn, contains a D-pointer to a data file. D-pointers are found in the SYSTEM Dictionary, the Master Dictionary, and file dictionaries. File Definition Items may only be created by the CREATE-FILE command or the file restore process. Only the DELETE-FILE command may be used to delete File Definition Items.

Item-ID. A File Definition item is a pointer to a dictionary or data file. The item-ID is the actual name of the referenced dictionary or data file. If it points to a data file, then the item-ID is the same as the name of the file.

Attributes. File Definition items can have 13 attributes. Attributes 4, 11, and 12 are reserved and are therefore empty.

  1. Definition Code. A D indicates a File Definition item. In addition, the following Definition Codes are also used:

  2. DX

    Do not save the file during a file-save; the file will not exist following a file-restore.

    DY

    Only save the file sizing parameters, not its data, during a file-save; the file will be empty following a file-restore.

    DC

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

    DU

    Indicates that file updates will not be logged by the Update Logger. U may be specified with other options.

  3. Base. The base frame ID is a positive integer indicating the starting location of the file. This value is assigned automatically by the CREATE-FILE processor. Do not change this value.

  4. Modulo. The modulo is a positive integer that indicates the number of groups occupied by the file. It is supplied as a parameter by the user during file creation. To change the modulo, edit Attribute 13 to resize a file during a file-save and restore. Do not change the modulo in Attribute 3.

  5. Reserved.

  6. Retrieval Code. An optional user-supplied security code that can be used to restrict access to a file. When specified, its value must match any retrieval code in the Account Definition item for the file to be accessed.

  7. Update Code. An optional user-supplied security code that can be used to prevent modification of a file. When specified, its value must match any update code in the Account Definition item for the file to be modified.

  8. Conversion Code. A conversion specification that is applied to the item-ID. Used by the INFO/ACCESS processor.

  9. Correlative Code. A correlative specification that is applied to the item-ID. Used by the INFO/ACCESS processor.

  10. Justification. A code that specifies the justification of the item-ID in a column. L indicates left-justification and R indicates right-justification. Used by the INFO/ACCESS processor. Left-justification is the default.

  11. Width. A positive integer indicating the maximum column width of the item-ID column. Used by INFO/ACCESS processor. "10" is the default width.

  12. Reserved.

  13. Reserved

  14. Reallocation. A positive integer that specifies a new file modulo. This parameter must be enclosed in parentheses. This modulo is used to resize the file during a file-restore.

  15. The following example of a File Definition item shows the entry in the Master Dictionary for the ORDERS file:

    ORDERS

    001 D

    002 6850

    003 7

    004

    005

    006

    007

    008

    009 L

    010 10

    011

    012

    013 (3)

    Note that the modulo of this file is currently 7. However, a reallocation parameter of 3 has been specified so that when the file is saved and restored from tape or floppy disk, the number of groups are reduced.

File Synonym Items

A File Synonym item is a Q-pointer to a File Definition item. Q-pointers can be created using the Editor. The SET-FILE command can also be used to establish a temporary Q-pointer named QFILE. Note that you cannot copy D-pointers using the COPY processor; therefore, Q-pointers are the only acceptable entries for file synonyms.

A File Synonym item may refer to another File Synonym item. However, the referenced File Synonym item may not point back to the referencing File Synonym item.

Item-ID. The item-ID is the name you choose for a file that already exists in the same account or in another account.

Attributes. File Synonyms usually have 3 to 10 attributes. Only Attributes 1, 2, and 3 differ from those in File Description items.

  1. Definition Code. A Q indicates a Synonym Definition item or Q-pointer.

  2. Account. The name of the account where the file is actually defined. If not specified, the file is to be found in the same account.

  3. File Name. The name of the referenced file. It is the item-ID of the actual File Definition item. If not specified, it refers to the target account’s Master Dictionary. A File Synonym item can also point to the Master Dictionary of another account.

The remaining attributes are the same as described for the File Definition item. The user cannot, however, specify a reallocation parameter for a Q-pointer.

The following example of a File Synonym item, BOOK-CAT, shows an entry for accessing the BOOK-CATALOG in the STAFF account:

BOOK-CAT

001 Q

002

003 BOOK-CATALOG

004

005

006

007

008

009 L

010 10

Line 2 is empty because the file synonyms are being defined in the same account as the one that contains BOOK-CATALOG. To access the file from another account, line 2 would contain STAFF, the name of the account.

See Also

Dictionary Items

Account Definition Items

Verb Definition Items

Attribute Definition Items