ACCEPT - FastExport

Teradata FastExport Reference

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

The ACCEPT command sets FastExport utility variables to the value of a specified:

  • External data source and valid character fields
  • Internal environment variable
  • The ACCEPT command is a valid command preceding LOGON and LOGTABLE commands.

    where:

     

    Syntax Element

    Description

    charpos1 and charpos2

    Start and end character positions of a field in each input record that contains extraneous information

    For example:

  • Use charpos1 to ignore only the single specified character
  • Use charpos1 THRU, to ignore all characters from charpos1 through the end of the record
  • Use THRU charpos2 to ignore all characters from the beginning of the record through charpos2
  • Use charpos1 THRU charpos2 to ignore all characters from charpos1 through charpos2
  • 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:

  • In z/OS, the fileid is a DDNAME. (See Table 24 on page 60.)
  • In UNIX OS and Windows, fileid is the path name for a file. If the path name has embedded white space characters, enclose the entire path name in single or double quotation marks.
  • 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.

    var

    Name of the FastExport 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.

    Table 24 describes the things to consider when using the ACCEPT command.

     

    Table 24: ACCEPT Command Usage Notes 

    Topic

    Usage Notes

    Specifying the System Console/Standard Input Device

    The asterisk (*) character can be used as the fileid specification for the system console/standard input (stdin) device.

    The system console is the:

  • Keyboard in interactive mode
  • Standard input device in batch mode
  • For more information about the keyboard and standard input devices, see “File Requirements” on page 13.

    z/OS fileid Usage Rules

    If a DDNAME is specified, FastExport reads data records from the specified source.

    A DDNAME must obey the same construction rules as Teradata SQL column names, except that:

  • The “at” character (@) is allowed as an alphabetic character
  • The underscore character (_) is not allowed
  • The DDNAME must obey the applicable rules of the external system and may reference a sequential or VSAM data set.

    If the DDNAME represents a data source on magnetic tape, the tape may be either labeled or unlabeled, as supported by the operating system.

    Source File Record Restriction

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

    Coding Multiple Variables

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

    Delimiting Input Text

    Input text for numeric values must be delimited only by space characters or record boundaries.

    Input text for character strings must be enclosed in apostrophes. For example, the data record provided to satisfy the following ACCEPT command should include two fields:

    .Accept age, name from file info;

    The following example shows two sample data records, where the first is correct but the second is not:

    32  ’Tom’
    32   Tom

    Number of Variables

    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, FastExport issues a warning message.