The SWAPMARKS() function interchanges the mark characters with the Unicode characters that they have displaced in a string.
Multivalue database systems define that characters 251 to 255 (U+00FB to U+00FF) are reserved as the mark characters (text mark, subvalue mark, value mark, field mark, item mark).
The Unicode character set defines these character positions as accented characters typically found in European languages. To resolve this conflict, QM moves the accented characters internally to an alternative position in the Unicode Private Use Area to become code points U+F8FB to U+F8FF, exchanging them with their Unicode positions where necessary on external interfaces.
The SWAPMARKS() function allows an application to interchange these two sets of five characters where internal processing may be simplified by conforming to the Unicode character positions.
Execution of this function on a non-ECS mode system returns the original string.
S = @VM
PRINT SEQ(S), SEQ(SWAPMARKS(S))
This program fragment prints