Previous Topic: GOODTRAILINGNext Topic: INSERT


INITCAP

Purpose

Returns the string that results when the first letter in the specified source string is capitalized and all other characters in the string are converted to lowercase.

Syntax

►►─── INITCAP ( string ) ─────────────────────────────────────────────────────►◄

Parameters

string

Specifies the string whose first letter is to be capitalized.

String can be:

Example

In the following example, the initial cap function is used on the employee's last name:

Initial value:
    EMP-LNAME: 'O'HEARN            '
Statement:
    MOVE INITCAP(EMP-LNAME) TO WK-STRING.
Returned string:
    'O'hearn           '