eg.
I have a sql file called step1.sql and its connent as follows:
step1.sql
-------------------------------------------------------------------
connect to mydb;
select * from myschema.mytable
where myname = 'xyz';
connect reset;
--------------------------------------------------------------------
i run this file thru the command:
db2 -tvf step1.sql
I wonder if I can use the system variable for the database name and the value of myname......as follows.. ( of course, the following stuff in not working), what I want is to pass a value from the system in to the db2 command line processor.........
ie. in unix platform for example
in unix console,
-------------------------------------------------------------------
export dbname=mydb
export myvalue=xyz
step1.sql
-------------------------------------------------------------------
connect to $dbname;
select * from myschema.mytable
where myname = $myvalue;
connect reset;
--------------------------------------------------------------------
is there any way to do thing like the above??
use stored procedural ??