TRIMSPACES | NOTRIMSPACES
Valid For
Extract and Replicat
Description
Use the TRIMSPACES
and NOTRIMSPACES
parameters to control whether or not trailing spaces in a source CHAR
column are truncated when applied to a target CHAR
or VARCHAR
column. TRIMSPACES
and NOTRIMSPACES
can be used at the root level of the parameter file as global ON/OFF
switches for different sets of TABLE
or MAP
statements, and they can be used within an individual TABLE
or MAP
statement to override any global settings for that particular MAP
or TABLE
statement.
TRIMSPACES
is applied only to single-byte white spaces (U+0020). Ideographic spaces (U+3000) are not supported.
For Extract, TRIMSPACES
only has an effect if Extract is performing mapping within the TABLE
statement (by means of a TARGET
statement).
Default
TRIMSPACES
Syntax
TRIMSPACES | NOTRIMSPACES
Examples
- Example 1
-
The following example uses
TRIMSPACES
andNOTRIMSPACES
at the root level of the parameter file. The default ofTRIMSPACES
is in effect until the lastMAP
statement, to whichNOTRIMSPACES
applies.MAP fin.src1, TARGET fin.tgt1; MAP fin.src2, TARGET fin.tgt2; MAP fin.src3, TARGET fin.tgt3; NOTRIMSPACES MAP fin.src4, TARGET fin.tgt4;
- Example 2
-
The following example uses
NOTRIMSPACES
within aMAP
statement to override the global default ofTRIMSPACES
. The default applies to the first twoMAP
statements, and thenNOTRIMSPACES
applies to the last two targets.MAP fin.src1, TARGET fin.tgt1; MAP fin.src1, TARGET fin.tgt2; MAP fin.src1, TARGET fin.tgt3, NOTRIMSPACES; MAP fin.src1, TARGET fin.tgt4, NOTRIMSPACES;