You might also like to try the perl module TSM.pm located on CPAN. The modules
provides very easy access to TSM .
-Craig Riley
The Children's Hospital in Denver
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Richard Rhodes
Sent: Friday, November 19, 2004 10:30 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: ksh here documents for sql cmds
Be kind . . . . don't laugh tooo hard . . . .
I thought I'd share this.
I got tired coding dsmadmc cmd line sql cmds like the following in ksh scripts
. . .
dsmadmc -id=admin -password=admin -tab \
select entity, count\(\*\) \
from summary \
where cast\(\(current_timestamp-start_time\)hours as decimal\(8,0\)\) \< 25
\
group by entity having count\(\*\)\>1 \
order by 2 desc
The admin ref manual doesn't say anything about dsmadmc accepting input from
stdin, but I figured I'd try it anyway . . . it WORKED!!!!
dsmadmc -id=admin -password=admin -tab <<EOD
select entity, count(*) \
from summary \
where cast((current_timestamp-start_time)hours as decimal(8,0)) < 25 \
group by entity having count(*)>1 \
order by 2 desc
EOD
Now, doesn't that look much better?
ok . . you can stop laughing at me now . . .
Rick
-----------------------------------------
The information contained in this message is intended only for the personal and
confidential use of the recipient(s) named above. If the reader of this message
is not the intended recipient or an agent responsible for delivering it to the
intended recipient, you are hereby notified that you have received this
document in error and that any review, dissemination, distribution, or copying
of this message is strictly prohibited. If you have received this communication
in error, please notify us immediately, and delete the original message.
DISCLAIMER:
CONFIDENTIALITY NOTICE: The information contained in this message is legally
privileged and confidential information intended for the use of the individual
or entity named above. If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the intended
recipient, you are hereby notified that any release, dissemination,
distribution, or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the author immediately
by replying to this message and delete the original message. Thank you.
|