Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference RUN
Functions and Expressions Reference Guide
175
! If you use the echo command option for more than one output card, the
data from all echoed cards will be concatenated together and passed back
as a text-item to the object in the map from which it was run.
! If you do not use the echo option, the return code indicating the status of
the map that was run will be passed back to the object in the map from
which it was run.
Example
RUN ("MyMap" , "-IE1s502 " + Invoice:File + " -OF1 c:\
<install_dir>
\" + CustomerID:Invoice)
This example runs the map, MyMap, sending Invoice data as the data source
for input card #1 of MyMap, overriding the filename of output card #1 based
on Customer data, and returns the map return code as the result.
RUN ( "GetDbOpt" , " " )
This example runs the map, GetDbOpt, with no command options specified
and returns the map return code as the result.
RUN ( "DoOneSet" , "-A -GR" +
" -IE1S" + NUMBERTOTEXT ( SIZE ( Set:InFile ) ) +
" " + TEXT ( Set:InFile ) +
" -OF1 OUT_SET." + NUMBERTOTEXT ( INDEX ( $ ) ) +
" -OE2" )
This example runs the map DoOneSet using the following command options:
"-A -GR" The DoOneSet map will produce no Audit Log and
restrictions will be ignored.
"-IE1S" + NUMBERTOTEXT ( SIZE ( Set:InFile ) ) +
" " + TEXT ( Set:InFile )
Using the echo input command option (-IE) with the sizing
method (Sn), one Set object of InFile is passed to input card
1 for the DoOneSet map.
" -OF1 OUT_SET." + NUMBERTOTEXT ( INDEX ( $ ) )
The output file for card 1 of the DoOneSet map will be called
"OUT_SET." plus a sequence number based on the index of the
Set in InFile. For example, the first output set will be
OUT_SET.1, and so on.