Where allowed to run:
|
Parameters Examples Error messages |
The Convert Letter Case (CLCASE) command converts the contents of a CL variable to all UPPER or all lower case letters. The original text (specifed on the VALUE parameter) is not modified. CLCASE has been deprecated in Cozzi appTools by the CLCONVERT command.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
VAR | CL var for converted data | Character value | Required, Positional 1 |
VALUE | Data to convert | Character value | Required, Positional 2 |
XLATE | Translation target | *TOUPPER, *TOLOWER, *UPPER, *LOWER | Optional, Positional 3 |
Top |
Specify a CL variable of TYPE(*CHAR) to receive the converted text. This can be the same variable as specified on the VALUE parameter or it may be another CL variable.
This is a required parameter.
Top |
Specify the original text to be converted.
This is a required parameter.
Top |
Top |
Example 1: Convert to Upper Case
CLCASE VAR(&NAME) VALUE(&USER)
By default the *TOUPPER option is selected, therefore this command will convert the contents of &USER to uppercase and store the results in the &NAME CL variable.
Example 2: Conver to Lower Case
DCL VAR(&NAME) TYPE(*CHAR) LEN(40) CHGVAR VAR(&NAME) VALUE('COZZI APPTOOLS ARE COOL!') CLCASE VAR(&NAME) VALUE(&NAME) CASE(*TOLOWER) /* &NAME = 'cozzi apptools are cool!' */
In this example, the text in &NAME is convert to lower case and is stored in &NAME.
Top |
Top |