Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

LOWER-CASE( ) Convert uppercase letters to lowercase

&pagelevel(3)&pagelevel

Domain: String functions/conversion functions

The LOWER-CASE( ) function converts all uppercase letters in the specified string to lowercase. 
The coded character set (CCS) serving as basis for this translation may be specified as an input parameter.

Format

LOWER-CASE( )

STRING =string_expression

,TRANSLATE = *ALL / *OUTSIDE-QUOTES-ONLY / *INSIDE-QUOTES-ONLY

,CODED-CHARACTER-SET = *STD / *EDF03IRV  / *CURRENT / string_expression

Result type

STRING

Input parameters

STRING = string_expression
Designates the string to be converted.

TRANSLATE =
Designates which characters are to be converted.

TRANSLATE = *ALL
Specifies that all characters are to be converted.

TRANSLATE = *OUTSIDE-QUOTES-ONLY
Specifies that only characters outside the apostrophes are to be converted.

TRANSLATE = *INSIDE-QUOTES-ONLY
Specifies that only characters inside the apostrophes are to be converted.

CODED-CHARACTER-SET =
Indicates which coded character set (CCS) is used to convert the input string to lower cases. If the CCS is not supported, or if the current CCS is not EDF03IRV and XHCS is not available, the operation is rejected. The CCS must be an 8-bit code. 16-bit codes (UTFE, UNICODE) are not supported.

CODED-CHARACTER-SET = *STD
Default value. The settings defined at procedure level apply (operand TRANSLATION-CCS of command SET-PROCEDURE-OPTIONS). Outside procedure, *STD is the compatible *EDF03IRV value if no external setting changes this into *CURRENT. The external setting is an optional REP for SDF-P-BASYS. This REP applies globally for all tasks.

CODED-CHARACTER-SET = *EDF03IRV
Only the characters defined in the basic coded character set are translated (compatible behavior)

CODED-CHARACTER-SET = *CURRENT
The characters are translated according to the coded character set currently active for the task.

CODED-CHARACTER-SET = string_expression
The characters are translated according to the specified coded character set.    

Remark:  When the built-in function processes string literals from a procedure, the input has already been translated in EBCDIC compatible format by the system. A coded-character-set specification (explicit name or implicit via *current) is only meaningful for extended EBCDIC character sets (e.g. EDF041 accented characters) or for values stored in variables which are coded in the specified character set (e.g. using the built-in function FROM-X-LITERAL).

Result

A string which consists only of lowercase letters, digits and special characters.

Error messages

SDP0486  ODD NUMBER OF APOSTROPHES IN STRING VALUE
SDP0539  CODED-CHARACTER-SET '(&00)' NOT SUPPORTED
SDP0540  CODED-CHARACTER-SET '(&00)' INVALID 
SDP0541  CODED-CHARACTER-SET '(&00)' UNKNOWN 
SDP0542  CODED-CHARACTER-SET FUNCTION NOT SUPPORTED BY CURRENT VERSION OF 
         SUBSYSTEM 'XHCS-SYS' 
SDP0543  SUBSYSTEM 'XHCS-SYS' NOT AVAILABLE

Example

/A = 'AbCD123' // 'Ghi'
/B = LOWER-CASE(STRING = A)
/SHOW-VARIABLE B
B = abcd123ghi 
/A = 'ABC''DEF''GHI'
/B = LOWER-CASE(STRING = A,TRANSLATE=*OUTSIDE-QUOTES-ONLY)
/SHOW-VARIABLE B
B = abc'DEF'ghi 
/A = 'ABC''DEF''GHI'
/B = LOWER-CASE(STRING = A,TRANSLATE=*INSIDE-QUOTES-ONLY)
/SHOW-VARIABLE B
B = ABC'def'GHI