There are a number of scripts which all get a specific piece of information from the database. Each script has a where clause that specifies the current month, e.g. 200801. To run them, each script needs to be opened and the date changed, before loading them into script manager and spooling the output to a new file. Does Script Manager allow for the input of variables?
Script Manager has no facility for inputting variables .
WORKAROUND:
Each script will need to be amended to replace each date with a variable name (This needs to be done only once).
e.g &&inp_month
SELECT COUNT (*)
FROM schemaA.table_name
Where (mnth_yr = &&inp_month)
Once this has been done for each script, edit the combined script as follows:
def inp_month = 200801
@c:\temp\test1.sql
@c:\temp\test2.sql
@c:\temp\test3.sql
@c:\temp\test4.sql
@c:\temp\test5.sql
@c:\temp\test6.sql
undef inp_month
The && indicates thatwhenvariable isdefinedonce it will be used in subsequent scripts. Subsequent runs of the combined script will only require the amendment of the inp_month variable.