classAnova - Knowledge Shared

Posted by: Bob Cozzi
IT Researcher
Cozzi Productions, Inc.
North Aurora, IL
RPG Open - Documentation Group
has no ratings.
Published: 08 Feb 2011
Revised: 04 Aug 2011 - 4024 days ago
Last viewed on: 10 Aug 2022 (3951 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Convert between Upper and Lower Case Letters Published by: Bob Cozzi on 08 Feb 2011 view comments

RPG Open

cvtCase - Convert Between Upper/lower Case

Syntax Diagram

result = cvtCase( inputText [ : convertOption ] );

The cvtCase subprocedure converts the input text string to all upper or all lowercase letters. This is a CCSID safe conversion.

The input string may be up to 1024 bytes (1k) in length and is converted to all uppercase when the second parameter contains *OFF ('0') or the RPG OPEN constant RO_UPPER.

The input string is converted to all lowercase when the second parameter contains *ON ('1') or the RPG OPEN constant RO_LOWER or is not specified (the default is to convert to lowercase letters).

            email = cvtcase(email);  // Convert the email address to all lowercase characters

This RPG OPEN subprocedure uses the IBM i API named QlgConvertCase to perform the conversion. This API takes into consideration the job CCSID which enables it to work correctly on systems outside of the North America as well as inside North America.

Return to

Return to home page.
Sort Ascend | Descend