In this example, the USING request modifier defines a variable parameter for use with an explicit transaction that reads character strings from a disk file and inserts them in signed zoned decimal format.
The USING request modifier precedes the BEGIN TRANSACTION statement, while the BEGIN TRANSACTION statement and the request associated with the USING clause are entered as one multistatement request.
.SET RECORDMODE ON .IMPORT DATA FILE = r13sales.dat; USING (zonedec CHARACTER(4)) BEGIN TRANSACTION ;INSERT INTO dectest (colz = :zonedec (DECIMAL(4), FORMAT '9999S')) ; USING (zonedec CHARACTER(4)) INSERT INTO Dectest (colz = :zonedec (DECIMAL(4), FORMAT '9999S')) ; USING (zonedec CHARACTER(4)) INSERT INTO Dectest (colz = :zonedec (DECIMAL(4), FORMAT '9999S')) ; END TRANSACTION;
In BTEQ applications, you can combine USING request modifiers with the .REPEAT command to perform multiple insertions automatically.