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