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 , 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\.