ACCEPT - Parallel Data Pump

Teradata Parallel Data Pump Reference

Product
Parallel Data Pump
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-3021
lifecycle
previous
Product Category
Teradata Tools and Utilities

ACCEPT

Purpose  

The ACCEPT command accepts data types and values from an external source and uses them to set one or more utility variables. The ACCEPT command is a valid command preceding LOGON and LOGTABLE commands.

Syntax  

where

 

Syntax Element

Description

var

Name of the utility variable that is to be set with the value accepted from the designated source

Character string values appear as quoted strings in the data file.

env_var

Environment variable that provides the value for the specified utility variables (var)

fileid

Data source of the external system.

The external system DD (or similar) 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 “at” sign (@) is allowed as an alphabetic character
  • the underscore (_) is not allowed
  • 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).

    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:

  • If charpos1 is specified, Teradata TPump ignores only the single specified character position.
  • If charpos1 THRU character positions are specified, Teradata TPump ignores character positions from charpos1 through the end of the record.
  • If THRU charpos2 is specified, Teradata TPump ignores character positions from the beginning of the record through charpos2.
  • If charpos1 THRU charpos2 is specified, Teradata TPump ignores character positions from charpos1 through charpos2.
  • Usage Notes  

    A single record, row, or input line is accepted from the designated source. Ensure that there is only one record in the file from which the ACCEPT command is getting the variables.

    If multiple variables are coded, each is sequentially assigned input text up to the first white space character encountered that is not within a quoted string.

    Input text for numeric values must be delimited only by white space or record boundaries. Input text for character strings must be enclosed in apostrophes. For example:

    .Accept age, name from file info;

    The data record provided to satisfy the preceding ACCEPT should include two fields. The following example shows two sample data records, where the first is correct but the next is not:

    32  'Tom'    /* This line contains valid data. */
    32   Tom     /* Tom is invalid data.           */

    An additional method of placing comments in input text is as follows:

    32  'Tom'; This line contains valid data.

    When the number of variables listed is greater than the number of responses available, unused variables remain undefined (NULL). If there are not enough variables to hold all responses, a warning message is issued. If the input source is a file, the next record (starting with the first) of the file is always retrieved.