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
TRIMSPACESandNOTRIMSPACESat the root level of the parameter file. The default ofTRIMSPACESis in effect until the lastMAPstatement, to whichNOTRIMSPACESapplies.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
NOTRIMSPACESwithin aMAPstatement to override the global default ofTRIMSPACES. The default applies to the first twoMAPstatements, and thenNOTRIMSPACESapplies 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;