At execution, internal name, as specified in FILEDEF, is mapped to external name. But not all internal names need to be defined with a FILEDEF parameter. If a FILEDEF parameter is not specified, the internal name itself is used as the external name.
Multiple FILEDEFs may be specified (one filename per FILEDEF). FILEDEFs do not override each other. Thus, there can be a list of FILEDEFs:
FILEDEF=(archive,ARCHIVE_%UEN%.DAT) FILEDEF=(ARCHIVE1,C:\TESTARC\ARCHIVE1) FILEDEF=(ARCHDICT,DICTIONARY_%UEN%)
If %UEN% is part of external name, then at execution of the Teradata ARC statement it is expanded to the actual UEN (Utility Event Number) or substituted with the value specified in the UEN runtime parameter in a RESTORE/COPY statement.
For example, if FILEDEF is defined as follows in an environment variable or in a default configuration file:
FILEDEF=(archive,ARCHIVE_%UEN%.DAT)
then in the following Teradata ARC script:
ARCHIVE DATA TABLES (DB), RELEASE LOCK, FILE=ARCHIVE
ARCHIVE is the internal name, ARCHIVE_%UEN%.DAT is the external name, and the final external name is something like ARCHIVE_1234.DAT, assuming that the UEN is 1234.