Setting Up Job Variables
Job variables can be set up in the following locations
SET MyTdpId = 'database1';
SET MyUserName = 'johndoe';
SET MyUserPassword = 'johndoe';
DEFINE JOB CREATE_SOURCE_EMP_TABLE
(
DEFINE OPERATOR DDL_OPERATOR
DESCRIPTION 'Teradata Parallel Transporter DDL Operator'
TYPE DDL
ATTRIBUTES
(
VARCHAR TdpId = @MyTdpId,
VARCHAR UserName = @MyUserName,
VARCHAR UserPassword = @MyUserPassword
);
APPLY
('DROP TABLE SOURCE_EMP_TABLE;'),
('CREATE TABLE SOURCE_EMP_TABLE(EMP_ID INTEGER, EMP_NAME CHAR(10));'),
('INSERT INTO SOURCE_EMP_TABLE(1,''JOHN'');'),
('INSERT INTO SOURCE_EMP_TABLE(2,''PETER'');')
TO OPERATOR (DDL_OPERATOR);
);
MyTdpId = 'database1',
MyUserName = 'johndoe',
MyUserPassword = 'johndoe'
Note: A global job variables file is available on UNIX and Windows systems.
tbuild -f weekly_update.txt -v jobvars.txt
For example, the jobvars.txt file might contain the following text:
MyTdpId = 'database1',
MyUserName = 'johndoe',
MyUserPassword = 'johndoe'
Note: On z/OS, specify a local job variables file through the DDNAME of ATTRFILE.
tbuild -f weekly_update.txt -u "MyTdpId = 'database1', MyUserName = 'johndoe', MyUserPassword = 'johndoe'"
For further information on specifying job variables on the command line, see “Assigning Job Variables on the Command Line” on page 141.
For more information, see “Setting Up the Job Variables Files” on page 72.