RUN FILE
Purpose
The RUN FILE command invokes the specified external source as the current source of commands and statements.
Syntax
where
Syntax Element |
Description |
fileid |
Data source of the external system The client system DD or equivalent statement specifies a file. UNIX and Windows Systems infilename (the path name for a file). If the path name has embedded white space characters, enclose the entire path name in single or double quotes. If the path name is enclosed by single quotation marks and there is an embedded single quotation mark, then an escape character (single quotation mark) needs to precede the embedded single quotation mark. Likewise, if the path name is enclosed by double quotation marks and there is an embedded double quotation mark, then an escape character (double quotation mark) needs to precede the embedded double quotation mark. If the path name contains single or double quotation marks, it should be enclosed in either single or double quotation marks. z/OS a true DDNAME. If DDNAME is specified, Teradata TPump reads data records from the specified source. A DDNAME must obey the same rules for its construction as Teradata SQL column names, except that: The DDNAME must also obey the applicable rules of the external system and may reference a sequential or VSAM data set. If DDNAME represents a data source on magnetic tape, the tape may be either labelled or nonlabelled (if the operating system supports it). The “at” sign (@) is allowed as an alphabetic character and the underscore (_) is not allowed. |
charpos1 and charpos2 |
Start and end character positions of a field in each input record which contains extraneous information Teradata TPump ignores the specified field(s) as follows: |
Usage Notes
Once Teradata TPump executes the RUN FILE command, further commands and DML statements are read from the specified source until a LOGOFF command or end‑of‑file condition is encountered, whichever occurs first. An end‑of‑file condition automatically causes Teradata TPump to resume reading its commands and DML statements from the previously active source (or the previous RUN source when RUNs are nested), either SYSIN for z/OS, or stdin (normal or redirected) in the UNIX OS. After SYSIN/stdin processes any user‑provided invocation parameter, it remains the active input source.
If an end‑of‑file condition occurs on fileid, SYSIN/stdin is read because there are no more commands or statements in the PARM string.
The command source specified by a RUN FILE command may contain nested RUN FILE commands to 16 levels.
On UNIX systems, an asterisk (*) can be used as the fileid specification for the system console/standard input (stdin) device. The system console is the:
or
Example
.RUN FILE LOGON;