Character text constants - Connect_ETL - 9.13

Connect ETL Data Transformation Language (DTL) Guide

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect (ETL, Sort, AppMod, Big Data)
Version
9.13
Language
English
Product name
Connect ETL
Title
Connect ETL Data Transformation Language (DTL) Guide
Copyright
2023
First publish date
2003
Last updated
2023-09-11
Published on
2023-09-11T19:01:45.019000

Character text constants can be specified in either of the following formats:

  • Double-quoted format
  • Single-quoted format

Double-quoted format contains printable characters and the Hex representation of one byte of text.

[repeat * ] { "a"} {X"xx"}

where

a = any printable character. To include a double-quote character in a string, include two double quotes.
xx = the Hex representation of one byte of text. Hex text constants are not associated with any encoding.
repeat the number of times the characters between double quotes is repeated to produce the string. For example, 2 * "ABC" is equivalent to "ABCABC"; 3 * X"FF" is equivalent to X"FFFFFF".

Single-quoted format

Single-quoted format contains printable characters and characters in escaped notation.

[U] 'cā€¦'

where

U a string encoded in UTF-8. Specify U to treat the literal as a Unicode literal before processing.
c = {a } {escaped_character} {\subfield_number }
a = any printable character. To include a single quotation mark or a backslash in a string, precede the character with a backslash.
escaped_character {\t} {\v} {\b} {\n} {\r} {\f} {\'} {\\} \t - horizontal tab \v -vertical tab \b - backspace \n - newline \r - carriage return \f - form feed \ā€™ - single quotation mark \\ - backslash
subfield_number the number of a sub-field defined by a parenthesized portion of a pattern. The maximum sub-field number is 9. See Extract function in the Connect ETL functions reference section of the Connect help.

Consider the following examples:

"sample" string of 6 characters
X"73616D706C65" = string of 6 characters equivalent to sample
2 * "sam" = string of 6 characters equivalent to samsam
'sample' string of 6 characters
'sam\tple' string with sam separated from ple with a tab
U'sam' string of 3 UTF-8 encoded characters equivalent to sam

At runtime, single and double-quoted character text constants are treated as locale encoded. If a task is saved in locale encoding, text constants remain in locale at run-time. No encoding conversion is performed. If, however, a task is saved in Unicode encoding, single and double-quoted text constants are converted from Unicode to locale at run-time.

Single-quoted character text constants that are prefixed with ā€˜Uā€™ and that serve as arguments in Unicode-encoded Connect ETL task file options are treated as Unicode encoded.

Note: A Unicode-encoded Connect ETL task file must have all of its options completely encoded in Unicode. A locale-encoded Connect ETL task file must have all of its options completely encoded in locale.