Re: script syntax with redirected output by select statement
1999-08-12 09:53:37
Subject: |
Re: script syntax with redirected output by select statement |
From: |
"Mapes, Mark" <MWM4 AT PGE DOT COM> |
Date: |
Thu, 12 Aug 1999 06:53:37 -0700 |
Hi Horst,
first, I would like to say that redirecting output is not always as straight
forward as, I think, it should be. One of the reasons is that the
redirection symbol ">" is also a valid SQL symbol for "greater than". If
you want to use the ">" as a greater than, then you don't leave a space
before it.
But that is not your problem. It seems that in this particular case, you do
not have a continuation character on the next to last line.
Mark
> ----------
> From: Horst Petersen[SMTP:petersen AT AM-GRUPPE DOT DE]
> Reply To: ADSM: Dist Stor Manager
> Sent: Thursday, August 12, 1999 6:18AM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: script syntax with redirected output by select statement
>
> Do anybody know the syntax of a script with a select statement and
> redirected output under AIX environment?
>
> example:
> file /tmp/cccc contains:
> select 'checkout libv' as "ADSM Cmd", -
> b.library_name, a.Volume_name, -
> 'checkl=y rem=y' as "ADSM Parameter" from -
> volumes a,libvolumes b -
> where a.stgpool_name= '$1' -
> and a.status = 'FULL' -
> and a.volume_name = b.volume_name order by a.volume_name >
> /tmp/adsmlist.lst
>
> adsm> define script xxx file=/tmp/cccc
> adsm> run script xxx stgpool01
> ANR2907E Unexpected SQL operator token - '>'.
> |
> ....................................................V..........
> .volume_name = b.volume_name order by a.volume_name >
> /tmp/adsmlist.lst
>
> In /tmp/adsmlist.lst I expect the sql-result. Start the same command from
> the adsm command line and all things are ok.
>
> regards
> h.petersen
>
|
|
|