Changing the case of data
You can translate data to uppercase on input, or you can change the case of existing data to upper or lowercase.
The CAPS initially ON - translate changed data to uppercase (CAPS) option on the relevant Editor Options panel determines the initial setting of the "convert to uppercase" feature. Select this option if you normally want data entered in input fields converted into uppercase. Do not select this option if you want to enter lowercase or mixed-case data. This option also affects the processing of CHANGE arguments.
The CAPS and CASE primary commands control whether data in the data area is translated to uppercase on input (CAPS, CAPS ON or CASE UPPER), or left alone (CASE, CASE MIXED or CAPS OFF. As already mentioned, the initial setting of the "convert to uppercase" feature at the start of an editor session is determined by whether the CAPS initially ON - translate changed data to uppercase (CAPS) option on the Editor Options panel is selected or not.
- If you overtype any data in a record, then:
- In CHAR, HEX or LHEX display format, the entire record is translated to uppercase.
- In SNGL or TABL display format, only the current field is translated to uppercase.
- The
CHANGE command treats the new (replacement) string as if it were specified
in all uppercase except in these case:
- The new string is enclosed in quotation marks, prefixed by the
letter C (for example,
C'New String'
) - The new string is specified as a hexadecimal string (for example,
X'C1C2C3'
)
If either of the above is true, then the new string is not translated to uppercase.
- The new string is enclosed in quotation marks, prefixed by the
letter C (for example,
- Translation to uppercase is turned off.
Any CAPS command overrides any previously entered CASE command, and any CASE command overrides any previously entered CAPS command.
You can change the case of existing data to uppercase or to lowercase, without having to input new data, by using prefix commands.
To change existing data to uppercase:
- Position your cursor in the prefix area of the record that you wish to change.
- Type the UC or UCn prefix command, where n represents the number of records to be changed, or type UCC on the first of a block of records to be changed and UCC in the prefix area of the last record in the block.
- Press Enter. The records are changed to uppercase.
To change existing data to lowercase:
- Position your cursor in the prefix area of the record that you wish to change.
- Type the LC or LCn prefix command, where n represents the number of records to be changed, or type LCC on the first of a block of records to be changed and LCC in the prefix area of the last record in the block.
- Press Enter. The records are changed to lowercase.