How to deal with quotes in TSM server scripts?
2003-04-27 12:40:56
Environment: TSM server 5.1.5.4 on AIX 5.1 ML03 / 660-6H1, and TSM client
5.1.5.14/15 on various platforms.
I wanted to define a script, say, like this:
tsm> define script numoff description='Calculate number of offsite tapes to'-
' go out'
tsm> update script numoff 'select count(*) as "Number of offsite tapes ready to
go" from volumes where stgpool_name='OFFSITE_COPY''
That doesn't seem to work because there are two sets of single quote marks
and I can't quite figure out how one might protect it or prevent immediate
evaluation/parsing.
Doing it as:
tsm> update script numoff 'select count(*) as "Number of offsite tapes ready to
go" from volumes where stgpool_name=\'OFFSITE_COPY\''
doesn't seem to work, either.
It would be accepted if I changed "Number of offsite tapes..." to 'Number
of offsite tapes...' (double to single quotes) but then that would generate
a run-time error due to not being a SQL string data type, I believe.
And so on for various permutations I've tried. Any suggestions on how one
might make the quoting work or am I just SOL?
-Dan
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- How to deal with quotes in TSM server scripts?,
Dan Foster <=
|
|
|