The ROWIDTOCHAR function converts a value of the ROWID data type to a value of the TEXT data type.
TEXT
The result of this conversion is always in the national character set and is 18 characters long.
Example 8-91 Converting ROWID Data to TEXT or NTEXT Data
Assume the following your analytic workspace has the following object definitions.
DEFINE myrowid DIMENSION ROWID DEFINE mytext VARIABLE TEXT DEFINE myntext VARIABLE NTEXT
Now you populate myrowid which has a data type of ROWID using a MAINTAIN statement. Then you use the ROWIDTOCHAR function to populate mytext which has a data type of TEXT and ROWIDTONCHAR function to populate myntext which has a data type of NTEXT. Reports show that all of the variables are populated.
MAINTAIN myrowid ADD CHARTOROWID('AAAFd1AAFAAAABSAA/')
mytext = ROWIDTOCHAR (myrowid)
myntext = ROWIDTONCHAR (myrowid)
MYROWID
------------------------------
AAAFd1AAFAAAABSAA/
MYTEXT
------------------------------
AAAFd1AAFAAAABSAA/
MYNTEXT
------------------------------
AAAFd1AAFAAAABSAA/