/DTL - 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

Purpose

To specify that the job is defined in the Data Transformation Language.

Format

/DTL [RUNTIMEVARIABLES runtimevariables_option] [ENCODING encoding_option]

where

runtimevariables_option = {ON } {OFF}
encoding_option = {LOCALE} {UTF-8 }

Location

The option must be the first option in the job definition.

Defaults

If the RUNTIMEVARIABLES clause is not specified, the default is ON.

If the ENCODING clause is not specified, the default depends on whether the DTL file has the UTF-8 BOM. If the file has the UTF-8 BOM, the default is UTF-8. If there is no BOM, the default is LOCALE. For details on encoding, see File Name and Syntax Requirements.

Notes

If this option is specified, Connect ETL validates that the job definition is specified in the Data Transformation Language syntax.

The ENCODING indicates the encoding of the DTL file itself. See File Name and Syntax Requirements.

The RUNTIMEVARIABLES indicates that the job specification is made dynamic using embedded runtime variables. Runtime variables are specified using environment variables. If the ON keyword is specified, then environment variables can be embedded anywhere in the job specification. If the OFF keyword is specified, Connect ETL does not expand environment variables before running the job.

An environment variable cannot be split across multiple lines.

Both the DOS syntax, using %, and the UNIX shell syntax, using $, for referencing environment variables are supported on both UNIX and DOS. An environment variable name must be atleast one character long and can only contain alphanumeric characters (A-Z, a-z, 0-9) and underscore (_).

An environment variable must be referenced by:

  • Prepending it with a $ as in $filename. The first non-alphanumeric and non underscore character, or the end of the line, terminates the name. Thus, filename is the variable name in $filename- and file is the variable name in $file<endofline>
  • Prepending it with a $ and enclosing it in braces as in ${abc}
  • Enclosing it in %’s as in %abc%.

Any options text that does not match the above rules is not considered a variable name and is not translated. For example, %format-%, ${length<endofline>, and %% are all left as is.

To use a $ sign or a % sign without signifying a run time variable, use $$ or %%. A double $ sign or % sign is replaced with a single $ sign or % sign respectively.

If an environment variable is not defined at run time, a warning is issued, and the name of the variable is not replaced in the command line.

Example

/DTL 
/TASK FILE "${TASK1}.dxt"
The environment variable TASK1 is replaced with its value. If this value is defined to be read_records, the task file name resolves to read_records.dxt.
/DTL
/TASK FILE "%JOIN_TASK%"
The environment variable JOIN_TASK is replaced by its value when running the job.
/DTL RUNTIMEVARIABLES OFF
/TASK FILE "${TASKFILE}.dxt"
Because runtime variable processing is disabled, the file name string "${TASKFILE}.dxt" is processed as is and not replaced by the value of the environment variable TASKFILE when running the job.
/DTL ENCODING UTF-8 
/TASK FILE join.dxt
The encoding of the job file is UTF-8.
/DTL
/TASK FILE join.dxt

If the job file has no BOM, Connect ETL parses the file using the encoding specified by the locale. If the job file has the UTF-8 BOM, Connect ETL parses the file using UTF-8 encoding. See File Name and Syntax Requirements.