Tom,
You could try (if you didn't do it yet) to replace the '%1' in your macro code
by %1, which should elimintae the search for a string %1 by the select
statement. Then, start your macro by passing the arguments with their quotes.
So, call your macro as follows:
macro temp.dsm '/osiris48' '/POE/003/009/OUTPUT'
Wim.
IBM Belgium
ADSM-L AT VM.MARIST DOT EDU on 05/07/98 02:38:46 PM
Please respond to ADSM-L AT VM.MARIST DOT EDU
To: ADSM-L AT VM.MARIST DOT EDU
cc:
Subject: macro substitions in SELECT statement
I'm trying to figure out how to get argument substitutions into a
select statement, but am having trouble because of the single
quotes necessary when specifying an object.
E.g., I have the following query:
SELECT node_name, filespace_name, hl_name, ll_name, object_id, \
backup_date, deactivate_date, owner, class_name \
FROM backups \
WHERE node_name = 'OSIRIS' \
AND filespace_name = '/osiris48' \
AND type = 'FILE' \
AND hl_name = '/POE/003/009/OUTPUT/'
which I would like to make into a macro file, allowing for
substitution variables in filespace_name and hl_name. I tried:
SELECT node_name, filespace_name, hl_name, ll_name, object_id,
\
backup_date, deactivate_date, owner, class_name \
FROM backups \
WHERE node_name = 'OSIRIS' \
AND filespace_name = '%1' \
AND type = 'FILE' \
AND hl_name = '%2'
But when I run the macro ('macro temp.dsm /osiris48
/POE/003/009/OUTPUT') the select is executed with a search for a
literal '%1' and '%2' instead of a variable substitution.
Is there a way to get a variable into the selection criteria of
the WHERE clause in a macro?
-- Tom
"It's a dog eat dog world, Thomas A. La Porte
and I'm wearing milkbone underwear." DreamWorks SKG
- Norm Peterson <tlaporte AT anim.dreamworks DOT com>
|