TRIM

Default: LDRTRIM

Purpose

The TRIM parameter specifies that spaces should be trimmed from the beginning of a text field, the end of a text field, or both. Spaces include blanks and other nonprinting characters such as tabs, line feeds, and carriage returns.

Syntax and Description

TRIM=[LRTRIM | NOTRIM | LTRIM | RTRIM | LDRTRIM]

The valid values for the TRIM parameter are as follows:

NOTRIM indicates that no characters will be trimmed from the field. This setting generally yields that fastest performance.

LRTRIM, LTRIM, and RTRIM are used to indicate that characters should be trimmed from the field. LRTRIM means that both leading and trailing spaces are trimmed. LTRIM means that leading spaces will be trimmed. RTRIM means trailing spaces are trimmed.

LDRTRIM is the same as NOTRIM except in the following cases:

  • If the field is not a delimited field, then spaces will be trimmed from the right.

  • If the field is a delimited field with OPTIONALLY ENCLOSED BY specified, and the optional enclosures are missing for a particular instance, then spaces will be trimmed from the left.

If trimming is specified for a field that is all spaces, then the field is set to NULL.

Restrictions

  • The TRIM parameter is valid only when the external table load method is used.

Example

The following example would result in a load operation for which no characters are trimmed from any fields:

TRIM=NOTRIM