Update data dictionary

Command group Flag affected Reversible Execute on client Platform(s)
Data management YES NO NO All

Syntax

Update data dictionary ([Test only]) {list-of-files (F1,F2,..,Fn) (leave empty to select all)}

Options

Test only If specified, the data file is not updated; the command purely tests to see if it would update the data file when executed without this option specified, and returns the flag set to true if an update would occur

Description

This command updates the data dictionary for the specified file or list of files. The data dictionary is a copy of the file class field definitions and is stored in the data file. The command lets you write minor file class changes to the data dictionary. These minor changes do not require data reorganization, and include changes such as adding new fields, altering field names and altering field lengths. You can only update the data dictionary if you are the only user logged on to the data file.

Update data dictionary updates the data dictionary for the specified list of file classes. If you omit a file name or list of files, all the files with slots in the current data file are updated.

If a specified file name does not include a data file name as part of the notation, the default data file for that file is assumed. If the file is closed or memory-only, the command does not execute and returns with flag false.

If the Test only option is specified, no updating is actually carried out, and the flag is set if at least one file in the data dictionary needs updating.

Certain changes made to a file class (that is, changes in indexes, field type changes and changes in file connections) require data reorganization. In this case, using Update data dictionary to keep the file class and the data file "in step" will be inappropriate. Reorganize data lets you test whether a data file needs reorganization as well as to reorganize it if necessary.

Example

Update data dictionary (Test only) ## all files
If flag true
  Update data dictionary ## all files
End If