9.30 CONVERT_STRING
Þ Note: Built-In Function Rules.
This Built-In Function converts a text string from one encoding to another.
For use with
|
Arguments
|
Return Values
|
Technical Notes
This BIF is intended for IBM i use. The IBM i translation table for the 'from code' to the 'to code" page must exist. If the table does not exist, the returned string will be the same as for the argument string.
If this Built-In Function is executed in Visual LANSA for Windows, no conversion will be done. The returned string will be the same as the argument string.
Example
FUNCTION OPTIONS(*DIRECT)
DEFINE FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2)
DEFINE FIELD(#tocode) TYPE(*DEC) LENGTH(5) DECIMALS(0)
DEFINE FIELD(#fromcode) TYPE(*DEC) LENGTH(5) DECIMALS(0)
DEFINE FIELD(#String1) TYPE(*CHAR) LENGTH(256) INPUT_ATR(LC) DEFAULT('convert this line')
DEFINE FIELD(#string2) TYPE(*CHAR) LENGTH(256) INPUT_ATR(LC)
REQUEST FIELDS(#string1 #tocode #fromcode)
USE BUILTIN(convert_string) WITH_ARGS(#string1 #tocode #fromcode) TO_GET(#string2 #RETCOD)
DISPLAY FIELDS((#RETCOD) (#string2))