In this section: |
Starting in FOCUS 7.6.9, you can call the LCWORD2 function in non-Maintain requests.
How to: |
The LCWORD2 function converts the letters in a character string to mixed-case by converting every alphanumeric character to lowercase except the first letter of each new word. If LCWORD2 encounters a lone single quotation mark, the next letter is converted to lowercase. For example, 'SMITH' would be changed to 'Smith' and JACK'S would be changed to Jack's.
LCWORD2(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, or a temporary field that contains the 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.
LCWORD2 converts the string O'CONNOR’s to mixed-case:
DEFINE FILE EMPLOYEE MYVAL1/A10='O'CONNOR'S'; LC2/A10 = LCWORD2(10, MYVAL1, 'A10'); END TABLE FILE EMPLOYEE SUM LAST_NAME NOPRINT MYVAL1 LC2 END
The output is:
MYVAL1 LC2 ------ --- O'CONNOR'S O'Connor's
Information Builders |