Running an informix query on remote server

Hi,

I have the following query:

-------------------------------------------------------------------
set -xv
ssh <remote server name> -l <login>
export CLIENT_LOCALE=<some value>
export INFORMIXDIR=<directory name>
TERM=vt100 $INFORMIXDIR/bin/dbaccess sysmaster@dwem_test&lt;&lt;EOF&gt;temp.txt
select d.name dbspace,
c.pagesize
from sysdbspaces d, syschunks c
where d.dbsnum = c.dbsnum
group by 1,2
having d.name = "dw_em1_comdbs1"
order by 1
EOF
-----------------------------------------------------------------------

Aim is to write a unix script (assuming script is placed in the source unix box) which will connect to the remote server via ssh command. Next it should execute an informix query on the remoteserver and the results fetched shuld be saved on the unix box

I tried executing this above query, but it doesnot work
Can any one provide some inputs if am missing some syntax

Thanks in advance,
Suresh

what is the error are you getting?

Did you miss a semicolon after TERM=vt100 ?

cheers,
Devaraj Takhellambam

Hi,

I got the error message as
/<informixdir>/bin/dbaccess not found....

When I try to directly connect to remote server and execute the dbaccess cmd..it works fine.

But running via script is creating this error message
Please suggest

Thanks
Suresh