C$TOUPPER and C$TOLOWER

These routines translate text to upper- or lower-case.

Usage

CALL "C$TOUPPER" 
    USING TEXT-DATA, VALUE TEXT-LEN

CALL "C$TOLOWER" 
    USING TEXT-DATA, VALUE TEXT-LEN

Parameters

TEXT-DATA PIC X(n) Contains the data to translate to upper- or lower-case.
TEXT-LEN USAGE UNSIGNED-INT, or a numeric literal Contains the number of characters to translate.

Description

C$TOUPPER translates the first TEXT-LEN characters in TEXT-DATA to upper-case. C$TOLOWER translates them to lower-case. No size checking is done on TEXT-DATA, so you must ensure that TEXT-LEN has a valid value. VALUE must be included in the calling statement. If it is omitted, the program will very likely encounter memory errors. These routines only translate characters with a numeric value of 0-128. Anything above that (such as é, with a value of 130) must be mapped to its associated upper- or lower-case character using the configuration variable UPPER-LOWER-MAP.

Note: You can also translate character strings using the intrinsic functions UPPER-CASE and LOWER-CASE, the CONVERTING option of the INSPECT statement, or the UPPER or LOWER options of the ACCEPT statement.