How to: |
Available Languages: reporting, Maintain
The LCWORD function converts the letters in a character string to mixed-case. It converts every alphanumeric character to lowercase except the first letter of each new word and the first letter after a single or double quotation mark. For example, O'CONNOR is converted to O'Connor and JACK'S to Jack'S.
If LCWORD encounters a number in the character string, it treats it as an uppercase character and continues to convert the following alphabetic characters to lowercase. The result of LCWORD is a word with an initial uppercase character followed by lowercase characters.
LCWORD(length, string, outfield)
where:
Integer
Is the length in characters of the character string or field to be converted, or a field that contains the length.
Alphanumeric
Is the character string to be converted enclosed in single quotation marks, or a field or variable containing the character string.
Alphanumeric
Is the name of the field that contains the result, or the format of the output value enclosed in single quotation marks. The length must be greater than or equal to the length of length.
LCWORD converts the LAST_NAME field to mixed-case and stores the result in MIXED_CASE.
TABLE FILE EMPLOYEE
PRINT LAST_NAME AND COMPUTE
MIXED_CASE/A15 = LCWORD(15, LAST_NAME, MIXED_CASE);
WHERE DEPARTMENT EQ 'PRODUCTION'
END
The output is:
LAST_NAME MIXED_CASE --------- ---------- STEVENS Stevens SMITH Smith BANNING Banning IRVING Irving ROMANS Romans MCKNIGHT Mcknight
WebFOCUS |