Souhail Ouabi
Souhail Ouabi

Reputation: 125

Parameter file for bteq

I have a bteq file that delete a table.

.LOGON Server/User,Password;
del from  Database.table all;

.LOGOFF
.EXIT

This operation works. What I want is to take the user/password from this bteq file, put them in a parameter file and then call them fromp there. Should i create a second bteq file as a parameter file ? and if so how can I declare those parameters and how can i call them ?

Upvotes: 0

Views: 1256

Answers (1)

Rob Paller
Rob Paller

Reputation: 7786

You can use the .RUN command to call an external file containing valid BTEQ commands. In this instance, you would take the .LOGON command along with the credentials and place it in another file. Your BTEQ script above would look like this afterwards:

.RUN FILE={path}/{filename}.{ext};

del from  Database.table all;

.LOGOFF
.EXIT

Upvotes: 1

Related Questions