SQL/MX 2.x Database and Application Migration Guide (G06.23+, H06.04+, J06.03+)

Converting SQL/MP Applications to SQL/MX
Applications
HP NonStop SQL/MX Database and Application Migration Guide540435-005
10-34
Character Sets
misinterpret string literals as delimited identifiers. For more information, see the
SQL/MX Reference Manual.
Character Sets
NonStop SQL/MP supports multiple character sets for character string literals and host
variables. However, SQL/MX Release 2.x supports a somewhat different collection of
those characters sets for literals and host variables:
ISO88591
UCS2 (Unicode)
KANJI
KSC5601
NCHAR (national character set)
Handling Unsupported Character Sets
When you convert an SQL/MP application to SQL/MX Release 2.x, you should have no
problems with host variable declarations for character sets that SQL/MX Release 2.x
supports. However, you must change host variable declarations for characters sets not
supported by SQL/MX Release 2.x to declare supported character sets. Otherwise,
NonStop SQL/MX returns an error stating that the character set is not supported.
If your SQL/MP application uses a character set that NonStop SQL/MX does not
support, such as ISO88592 through ISO88599, you must change the character set
specification in the application to UCS2 or ISO88591. You must also alter the related
SQL/MP table column to use the same character set. To avoid having to alter the table,
you might reconsider converting your SQL/MP application to NonStop SQL/MX.
Updating the Character Set Specifiers
NonStop SQL/MX does not allow a space after the character set qualifier in SQL/MX
text. Remove the space after the character set qualifier, as this example shows:
_UCS2'string'
Using NCHAR Host Variables and Literals
NonStop SQL/MX interprets the national character set, NCHAR, in an application to be
the default value that was set when SQL/MX Release 2.x was installed, which is either
UCS2 (the default), ISO88591, KANJI, or KSC5601. If you convert an SQL/MP
application that has NCHAR host variables or literals that do not use the same
character set as the SQL/MX system default, errors or invalid data might result. For
example, an SQL/MP application might use Kanji as the NCHAR character set, but
NonStop SQL/MX uses UCS2 as the NCHAR character set. To avoid that problem,
carefully choose the national character set when you install SQL/MX Release 2.x on
your system.