BTEQ - REPEAT command with Multiple sessions in Teradata

The following code illustrates the usage of REPEAT with multiple sessions.

.SET sessions 2
.REPEAT 2
database forgetcode;
.IMPORT data file=sample.txt
.REPEAT 2
using eid (char(2))
update tbl_employee set salary=salary*1.07
where empno=:eid;


The first repeat command will assign the database forgetcode for the both sessions.
The second repeat command will do the update operation by reading the inputs from the sample.txt file.

The interesting feature here is BTEQ automatically assign the input values to the sessions accordingly.
In our example, the second repeat statement REPEAT 2 will assign a update statement for each session (We used 2 here).