Syntax - FastExport

Teradata® FastExport Reference

Product
FastExport
Release Number
16.20
Published
September 2020
Language
English (United States)
Last Update
2020-09-11
dita:mapPath
lki1527114222329.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2410
lifecycle
previous
Product Category
Teradata Tools and Utilities

The IMPORT command syntax depends on whether the FastExport utility is running on a mainframe-attached or network-attached client system. Several of the syntax elements are common to both configurations, while others are specific to each.





where the following is true:

INFILE fileid
Input file on the client system
The client system DD or equivalent statement specifies a file:
  • In UNIX OS and Windows, the fileid is the path name for a file

    If the path name has embedded white space characters, the path name must be enclosed 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.

  • In z/OS, the fileid is a DDNAME.
  • fileid must refer to a regular file. Specifically, pipes are not supported.
AXSMOD name
Name of the access module file to be used to import data. These access modules include:
  • Teradata Access Module for OLE DB: oledb_axsmod.dll on Windows platforms
  • Teradata Access Module for JMS (libjmsam.so on AIX, Solaris SPARC, Solaris Opteron, Linux, z/Linux platforms, HP-UX Itanium platforms and libjmsam.dll on Windows platforms).

A personal shared library file name can be used if custom access module is used..

The AXSMOD option is not required for importing disk files on either network-attached or mainframe-attached client systems, or magnetic tape files on mainframe-attached client systems. It is required for importing magnetic tape and other types of files on network-attached client systems.

To specify the Teradata Access Module for OLE DB and Teradata Access Module for JMS for specific platforms, see Teradata Tools and Utilities Access Module Reference (B035-2425).

init-string
Optional initialization string for the access module
The initialization string can contain double quotes, but not single quotes.
INMOD modulename
Optional user-written routine for preprocessing the input data
In z/OS, modulename is the name of a load module. On UNIX and Windows client systems, it is the pathname for the INMOD executable code file.
When both the INFILE fileid and the INMOD modulename parameters are specified, FastExport reads the input file and passes the data to the INMOD routine for preprocessing.
If the INFILE fileid parameter is not specified, FastExport expects the INMOD routine to provide the input data record.
FastExport provides two parameters to the named routine, as described in FastExport/INMOD Routine Interface.
On some versions of UNIX operating systems, ./ prefix characters may have to be added to the INMOD modulename specification if the module is in the current directory.
If INMOD module output messages to stdout, the character set that INMOD uses is independent of the character set that Teradata FastExport uses; the display on stdout can be of mixed character sets. For example, IMMOD can output messages in ASCII and Teradata FastExport can output messages in UTF-16.
USING (parms)
Character string containing parameters can be passed to the INMOD routine:
  • The parms string can include one or more character strings, each delimited on either end by either an apostrophe or a quotation mark
  • The maximum size of the parms string is 1K bytes
  • Parentheses within delimited character strings have the same syntactical significance as alphabetic characters
  • Before passing the parms string to the INMOD routine, FastExport replaces the following with a single blank character:
    • Each comment
    • Each consecutive sequence of white space characters, such as blank, tab, and so on, that appears outside of delimited strings
  • The entire parms string must be enclosed in parentheses and, on mainframe-attached client systems, the parentheses are included in the string passed to the INMOD routine
The parms string must be FDLINMOD for INMOD routines written for the prior Pascal version of FastLoad (program FASTMAIN).
FORMAT…
Record format of the input file, where:
  • FASTLOAD specifies that each record is a two-byte integer, n, followed by n bytes of data, followed by an end-of-record marker, either X '0A' or X '0D'
  • BINARY specifies that each record is a two-byte integer,n, followed by n bytes of data
  • TEXT specifies that each record is an arbitrary number of bytes followed by an end-of-record marker, either X '0A' or X '0D'

    TEXT format does not support numeric data. Do not specify TEXT if the MLSCRIPT option of an EXPORT command is also used.

  • UNFORMAT specifies that each record is imported as it is received from CLIv2 without any client modifications
  • VARTEXT specifies that each record is in variable-length text record format, with each field separated by a delimiter character
All above FORMAT options apply to UNIX and Windows platforms. The VARTEXT option applies to mainframe. The default FORMAT option for UNIX and Windows platforms is FASTLOAD. The default FORMAT for mainframe is “use record boundaries “, meaning the input data is read record-by-record and the LAYOUT is applied to each record.
‘c’
Optional specification of the delimiter that separates fields in the variable-length text records of the input data source
The delimiter can be a single or multi-character sequence (or string).
If the delimiter is not specified, the default is the character sequence consists of a single pipe character (|).
If the script character set is different from the client session character set, the delimiter is converted from the script character set to the client session character set before it is passed to Data Connector.
Any character sequence that appears in the data cannot be used as a delimiter. No control character other than a tab character can be used in a delimiter.
DISPLAY ERRORS
[Optional] Keyword specification that writes input data records that produce errors to the standard error file
NOSTOP
[Optional] Keyword specification that inhibits the FastExport termination in response to an error condition associated with a variable-length text record
LAYOUT layoutname
Identifier of the file layout description, as specified by a prior LAYOUT command
EFILE <efilename>
Optional keyword specification that writes input data records that produce errors to the user specified error file. If the user does not specify the error file name, the default error destination is the standard error file for network-attached platforms, and the SYSOUT for channel-attached platforms.
TRIM
Optional keyword. It is used to specify whether field values in variable-length text record could be trimmed. It must be followed by one of the following keywords: NONE, LEADING, TRAILING or BOTH.
NONE
Can follow the keyword TRIM. It is used to specify that field values are not to be trimmed. TRIM NONE is the default behavior of the trim processing which is the same as not specified the TRIM at all.
LEADING
Can follow the keyword TRIM. It is used to specify the leading characters of field values must be trimmed. See 'p' below for trim character specification.
TRAILING
Can follow keyword TRIM. It is used to specify that the trailing characters of field values must be trimmed. See 'p' below for trim character specification.
BOTH
Can follow keyword TRIM. It is used to specify that the leading and trailing characters of field values must be trimmed. See 'p' below for trim character specification.
'p'
Optional specification of the trim character in field values of variable-length text records of the input data source. It is specified after the keyword LEADING, TRAILING or BOTH.
Rules for a trim character are:
  • The trim character must be a single character, but may be either a single-byte or multi-byte character. It is expressed in the client session character set.
  • By default, if 'p' is not specified, the trim character is the blank (space) character.
  • Trimming can be performed on either unquoted or quoted field values.
  • If a field consists solely of one or more trim characters, it will be a zero-length VARCHAR after trimming. It can be set to NULL using NULLIF option on the DEFINE command.
QUOTE
Optional keyword. It is used to specify whether field values in variable-length text record will never be quoted (if it is followed by keyword NO), optionally be quoted (if it is followed by keyword OPTIONAL) or always be quoted (if it is followed by keyword YES). It must be followed by one of the following keywords: NO, OPTIONAL or YES.
NO
Can follow keyword QUOTE. It is used to specify that field values will never be quoted. It is the default behavior.
OPTIONAL
Can follow keyword QUOTE. It is used to specify that field values will optionally be quoted.
YES
Can follow keyword QUOTE. It is used to specify that field values will always be quoted.
'q'
Optional specification of the opening quoted character in field values of variable-length text records of the input data source. See 'r' for more information.
'r'
Optional specification of the closing quoted character in field values of variable-length text records of the input data source.
Rules for opening and closing quoted characters are:
  • The quote character, either opening or closing quote, must be a single character, but may be either a single-byte or multi-byte character. It is expressed in the client session character set.
  • The opening and closing quote characters can be different.
  • If only 'q' is specified, it's used for both opening and closing quotes.
  • By default, if 'q' or 'r' are not specified, the opening quote or the closing quote is the '"' character.