Using a Configuration File or Environment Variables - Teradata Tools and Utilities

Teradata® Archive/Recovery Utility Reference

Product
Teradata Tools and Utilities
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-06-05
dita:mapPath
fac1527114221922.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2412
Product Category
Teradata Tools and Utilities

Frequently used command-line options can be saved in an environment variable or configuration file. For example, if T:\DEFAULTS\CONFIG.ARC contains the following runtime parameters (the parameters are defined in this file):

CATALOG
FILEDEF=(ARCHIVE,ARCHIVE_%UEN%)
SESSIONS=8

and one or both of the following environment variables:

  • ARCDFLT
  • ARCENV or ARCENVX (These are the same environment variables, except that ARCENVX has override priority.)

are set temporarily at the command prompt:

SET ARCDFLT=T:\DEFAULT\CONFIG.ARC
SET ARCENV=WDIR=C:\TEMP\ARC\

or set permanently, using Start > Settings > Control Panel > System > Environment, then ARCMAIN can be called:

ARCMAIN RLOG=JOB980813 <INPUT.ARC

In the above command, runtime parameters RLOG=JOB980813 are not defined in a configuration file or in an environment variable because they are job-specific. The call to ARCMAIN is equivalent to the following command-line invocation of Teradata ARC:

ARCMAIN CATALOG
   FILEDEF=(ARCHIVE,ARCHIVE_%UEN%) SESSIONS=8    WDIR=C:\TEMP\ARC    RLOG=JOB980813
<INPUT.ARC

When called, ARCMAIN automatically uses the context of any set environment variable. The example assumes that ARCENV is set to WDIR=C:\TEMP\ARC\.