OdiOutFile -FILE=<file_name> [-APPEND] [-CHARSET_ENCODING=<encoding>] [-XROW_SEP=<hexadecimal_line_break>] [CR/LF <text> | -TEXT=<text>]
Generates a text file on the machine on which the execution agent is running.
The file is stored in the path defined by <file_name> and contains the text specified by <Text>. The optional parameter -APPEND can be used to append the <Text> at the end of the file if it already contains data. The parameters -FILE and -APPEND must be specified on the same line.
Parameters |
Mandatory |
Description |
---|---|---|
-FILE=<file_name> |
Yes |
Target file. Its path may be absolute or relative to the execution agent location. |
-APPEND |
No |
Indicates whether <Text> must be appended at the end of the file. If this parameter is not specified, the file is overwritten if it does exist. |
-CHARSET_ENCODING=<encoding> |
No |
Target file encoding. Default value is ISO8859-1. You will find a list of supported encoding at the following URL: http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html |
-XROW_SEP=<hexadecimal_line_break> |
No |
Hexadecimal code of the character used as a line separator (line break). Defaults to 0A (Unix line break). For a windows line break, the value should be 0D0A. |
CR/LF <text> or -TEXT=<text> |
Yes |
Text to write in the file. This text can be typed on the line following the OdiOutFile command (A carriage return - CR/LF - indicates the beginning of the text), or can be defined with the -TEXT parameter. The -TEXT parameter should be used when calling this Oracle Data Integrator command from an OS command line. The text can contain variables or substitution methods. |
The command ...
OdiOutFile -FILE=/var/tmp/my_file.txt
Welcome to Oracle Data Integrator
This file has been overwritten by <%=odiRef.getSession("SESS_NAME")%>
... generates the file /var/tmp/my_file.txt on the UNIX machine of the agent that executed it.
The command ...
OdiOutFile -FILE=C:\winnt\system32\drivers\etc\hosts -APPEND
195.10.10.6 PLUTON pluton
... adds the entry PLUTON into the file hosts of the NT machine of the agent that executed it.