RE: basic shell (ksh) template to execute stored procedure
Posted in 2000
Topics: Stored Procedures & SPL, Server Administration
#!/usr/bin
dbaccess $database << eof
execute RTFM ();
eof
> -----Original Message-----
> From: Emmanuel Weyers [SMTP:Emmanuel.Weyers@orange.be]
> Sent: Thursday, December 21, 2000 3:44 AM
> To: informix-list@iiug.org
> Subject: basic shell (ksh) template to execute stored procedure
>
> Hi,
>
> Can somebody help me with the basics of writing a korn shell script that
> will
> execute a stored procedure (or execute a sql statement).
> The perpose is to write an interface between 2 informix databases.
> (shedule a
> cron job ...)
>
> Thanks
>
> Manu
>
"Henderson, Scott" wrote:
>
> #!/usr/bin
>
> dbaccess $database << eof
>
> execute RTFM ();
>
> eof
That generates a "cannot execute" error (you can't execute directories).
#!/usr/bin/ksh
dbaccess $database - << ROFL
execute procedure RTFM("Please");ROFL
> > -----Original Message-----
> > From: Emmanuel Weyers [SMTP:Emmanuel.Weyers@orange.be]
> > Sent: Thursday, December 21, 2000 3:44 AM
> >
> > Can somebody help me with the basics of writing a korn shell script that
> > will execute a stored procedure (or execute a sql statement).
> > The perpose is to write an interface between 2 informix databases.
> > (shedule a cron job ...)
Of course, there's also the question of why can't you simply access the
other database? INSERT INTO TotherDB:TotherTable SELECT Whatever FROM
LocalTable... There are a number of possible reasons -- mismatched
logging levels is the most likely.
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"