Previous Topic Next topic Print topic


C$TOUPPER and C$TOLOWER

These routines translate text to upper- or lower-case.
Note: This ACUCOBOL-GT library routine is available in this COBOL version. Any compatibility issues in this COBOL system are in the Compatibility Issues section at the end of the topic.

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.

Compatibility Issues

  • Calls to these routines immediately call the Micro Focus library routines CBL_TOUPPER and CBL_TOLOWER.
Previous Topic Next topic Print topic