Pasing a Paramater Value in BTEQ

Tools
Fan

Pasing a Paramater Value in BTEQ

Hi,

I am trying to pass on a parameter value into a BTEQ script. The query is to accept parameters and query the paramater and export the result into a Textfile or Table.

Paramaters to be pass onand Resident_ID.

.RUN FILE = 'LOGON.DAT';

SELECT distinct q.Resident_ID
, q.LName
, q.FName
, q.Address

FROM QueryReside AS q

WHERE q.Resident_ID = '&para_number'
AND zip = '&zip'

.LOGOFF;

and I obsolutely have no idea of passing a paramater. Can someone please help out??
2 REPLIES
Enthusiast

Re: Pasing a Paramater Value in BTEQ

Hi Kim,

I am not sure , that we can pass runtime parameter in BTEQ utility, But If you really want to do this

Do follow these steps:
----------------------

1) Create the BTEQ Scripts

2) Create the Shell scripts & call those Scripts inside this & use the variables over here

this could help you...... let me know if any issues. Also I will let you know some other Approach for this as soon as poss

Fan

Re: Pasing a Paramater Value in BTEQ

Hi Maran,

Thanx for the heads-up. Could you please be of assistant, given the below SQL-script, to help create or send a sample Shell script and explain how to go about it.

SELECT distinct q.Resident_ID
, q.LName
, q.FName
, q.Address

FROM QueryReside AS q

WHERE q.Resident_ID = '&para_number'
AND zip = '&zip'