Trim - Connect_CDC - connect_cdc_mimix_share - Latest

Connect CDC System Reference Guide

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (MIMIX Share)
Version
Latest
Language
English
Product name
Connect CDC
Title
Connect CDC System Reference Guide
Copyright
2024
First publish date
2003
ft:lastEdition
2024-08-20
ft:lastPublication
2024-08-20T21:40:14.000381

Method:   Trim

Function name:   trim

Parameter list:   (CHAR value, CHAR trim_location, CHAR trim_char)

Return type:    CHAR

What the method does:    Strips all occurrences of the specified leading character from the input, the specified trailing character, or both.

Specify:

Character input value

Location indicator: an uppercase quoted string ('L', 'T', or 'B')

Note: Trim location character must be one of the following:

  • L

  • T

  • B

Trim character: If this is a literal, it must be just one character. For example, to trim trailing, lowercase “s” values:

trim(C5, 'T', 's');

where C5 is a character column name.

With this specification and given the following value for the C5 column:

ABCDEss-Ss

The return value would be:

ABCDEss-S

The following expression trims the trailing “s” and the trailing “S”:

ABCDEss-Ss:
            trim(trim('ABCDEss-Ss', 'T', 's'), 'T', 'S');

This yields the result: ABCDESS.

Refer to Numeric Conversion Routines for more information.