Case Sensitivity

By default, Reality is case sensitive; that is, upper and lower case letters (for example, "A" and "a") are treated as different characters. The only exceptions are as described in Case Sensitivity at TCL and in utilities and applications that have been specially written to accept input in both upper and lower case.

Some other MultiValue systems (notably D3) are not case sensitive, and this can make it difficult to transfer data and applications to and from Reality. In order to make migration easier, Reality provides a number of features that can be used to make Reality behave in a case insensitive manner. Note that currently this only affects data comparisons; later versions of Reality will provide additional capabilities.

There are three aspects Reality's operation for which you can control case-sensitivity:

Caution

Although these features can be controlled separately, it is recommended that you set them by selecting the appropriate MultiValue emulation when you create your database. Using only some of Reality's case-insensitivity features can have unexpected consequences (for example, problems logging on, accessing file and accounts, and so on).

MultiValue compatible databases

The mkdbase host command has a interactive menu interface which allows you to choose a MultiValue emulation (Reality, mvEnterprise, mbBase or D3) for a new database. This automatically enables data, keyword and item-id case-insensitivity If appropriate, sets the frame size to an appropriate value, and changes the default user operating environment to be compatible with the selected emulation.

When you install Reality, you can choose a MultiValue emulation to give mkdbase the appropriate default settings.

Data case-insensitivity

Data case-insensitivity affects data comparisons. For example, "FRED" EQ "Fred" evaluates to false if the comparison is case-sensitive, or true if case-insensitive.

You are only allowed to use data case-insensitivity if this is enabled on both the database and in your operating environment:

With the DATA.CC environment option set, you can also switch between case modes:

Keyword case-insensitivity

Keyword Case-insensitivity affects whether the case of run-time system literals is significant. For example, in the DataBasic LOCATE statement, the sequence parameter must be in upper case if the system is case-sensitive, while its case is ignored if the system is case-insensitive ("AR", "ar", "Ar" and "aR", for example, have the same effect).

To use keyword case-insensitivity, you must enable it on both the database and in your operating environment:

This affects the following types of keyword:

In addition, if you compile your DataBasic programs with the COMPILE command, the case of keywords, variables and labels is ignored. Note that this is not dependent on having enabled keyword case-insensitivity.

Item-id case-insensitivity

Item-id Case-insensitivity affects the system in several ways:

To use item-id case-insensitivity, you must enable it on the database. This is done my selecting the appropriate mkdbase option when creating or rebuilding the database. When creating a new database, you can also specify that the SYSTEM dictionary should be case-insensitive.

Note

If you set the REALCASEINSENSITIVE host environment variable, mkdbase will always create an item-id case-insensitive database.

Once your database is enabled for item-id case-insensitivity, you can create accounts, files and directory views that are item-id case-insensitive by using the W option with CREATE-ACCOUNT, CREATE-FILE and DIR-VIEW. The CONVERT-FILE TCL command allows you change a file or account MD from case-sensitive to insensitive or vice versa.

Notes:

  • The INSENS.CREATE.FILE environment option allows you to set the default case setting (sensitive or insensitive) for file, account and directory view creation. You can use the W (insensitive) and U (sensitive) options to override the default.
  • Files saved from a case-insensitive MultiValue system such as D3 are automatically restored as case-insensitive (unless they were specifically marked as case-sensitive on the source database).