0 - 3 of 3 tags for procedures

I have a bteq script which creates procedures inside a database. The dbname say DB1 i will be specified in the bteq command.
The new change we have got now is that the statements inside the procedures would access tables of another DB say DB2.
Can we have a dynamic bteq script where we can specify DB2 too as a parameter??

 

Hi All

I would like to find out the dependency between Stored procedures and the associated tables using data dictionary tables. I have tried my best to find out but went in vain.

Please suggest me a way to find out using teradata only.

i have couple of questions:

how to pass queries in the procedure ( i would be passing different queries at different times)
execute them as cursors
how to find out the no of coulmns in the cursor and fetch them into strings or array( as no of columns in the queries would be changing each for each call)