Document toolboxDocument toolbox

Char Function Call

Query name

Char Function Call

Server Asset Type

Transformer stage

Analysis Type

Remediation

Description

Identifies Transformers which call Char()

Issue

The Char(code) Transformer function is available in both Server and Parallel jobs but their behavior when converting a character code above 127 is different:

  • Server Transformer - Character codes above 127 are converted based on the currently active NLS Character set.

  • Parallel Transformer - Character codes above 127 produce a space character

The closest comparable PX function is Char(code, 1) but S2PX can’t use this by default as it fails to compile when used with Unicode strings or an NLS Character map which does not support the extended ASCII character range (codes 127 - 255).

Actions

Review current job logic and the NLS Character map in use. If the code argument can be above 127 and an NLS Character map which supports characters in the extended ASCII range (codes 127 - 255) is in use, then change Char(code) to Char(code, 1).

See the following IBM DataStage Support article for further details. Be aware that the page title incorrectly refers to character codes 80-255 instead of 128-255 in decimal or 0x80-0xFF in hex.

 

© 2015-2024 Data Migrators Pty Ltd.