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 - 4641 days ago
Last viewed on: 17 Apr 2024 (4395 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).

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

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 RPGOpen.com

Return to classanova.com home page.
Sort Ascend | Descend

COMMENTS