LOCASV: Creating a Variable Length Lowercase String

How to:

The LOCASV function converts alphabetic characters in the source string to lowercase and is similar to LOCASE. LOCASV returns AnV output whose actual length is the lesser of the actual length of the AnV source string and the value of the input parameter upper_limit.

Top of page

Syntax: How to Create a Variable Length Lowercase String
LOCASV(upper_limit, source_string, output)




Is the limit for the length of the source string.


Alphanumeric of type An or AnV

Is the string to be converted to lowercase. If it is a field, it can have An or AnV format. If it is a field of type AnV, its length is taken from the length in bytes stored in the field. If upper_limit is smaller than the actual length, the source string is truncated to this upper limit.


Alphanumeric of type An or AnV

If the output format is AnV, the actual length returned is equal to the smaller of the source string length and the upper limit.

Example: Creating a Variable Length Lowercase String

LOCASV converts LAST_NAME to lowercase and specifies a length limit of five characters. The results are stored in a column with the format A15V:


For SMITH, the result is smith.

For JONES, the result is jones.

iWay Software