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:
-
The system administrator must allow data case insensitivity on a particular database by setting the DataCaseControl database configuration parameter.
Note
It is recommended that, if you have migrated from a case insensitive MultiValue system such as D3, you should set this configuration option in the master configuration file, so that data case insensitivity is selected by default when you create a database.
-
You can then select data case insensitivity by setting the DATA.CC environment option. The system administrator would normally set this for a particular user by specifying an appropriate environment in their user profile.
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:
-
The system administrator must allow keyword case insensitivity on a particular database by setting the KeyCaseControl database configuration parameter.
Note
It is recommended that, if you have migrated from a case insensitive MultiValue system such as D3, you should set this configuration option in the master configuration file, so that keyword case insensitivity is selected by default when you create a database.
-
You can then select keyword case-insensitivity by setting the KEY.CC environment option. The system administrator would normally set this for a particular user by specifying an appropriate environment in their user profile.
This affects the following types of keyword:
-
Those in account and file definition items (local, synonym and remote).
-
All those in command and command synonym definition items (including Proc commands).
Note
The case-sensitivity of TCL commands called from Procs and TCL macros depends on the item-id case sensitivity of the account's
. -
Those in data definition items.
-
Conversion codes (wherever used) and their operators and operand keywords.
-
String keyword parameters in DataBasic statements and functions.
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:
-
The case of file dictionary and data item names is ignored.
-
If an account's
is case-insensitive, the case of command names is ignored. -
If both the dictionary of a file and the MD of the account containing that file are case-insensitive, the case of that file name is ignored.
-
If the SYSTEM dictionary is case-insensitive, the case of account names is ignored.
Note
Account passwords are always case-sensitive.
-
If a file has case-insensitive item-ids, in English selection clauses and those English commands that sort by item-id (such as SORT and SSELECT), case is ignored when comparing item-ids. Note, however, that this is only the case if attribute 8 of the data definition item is null; if attribute 8 contains any pre-processor codes, case is only ignored if data case-insensitivity is enabled.
Because index definitions are based on English, this also applies to indexes.
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).