Re: Create Stored Procedure DBAccess SQL File
Posted in 2000
R Smith wrote:
>
> kstout@masconsulting.com (KCStout) wrote in <4h6G4.1395$UQ1.140537@news-
> east.usenetserver.com>:
>
> >I am trying to create a stored procedure from the command line using
> >dbaccess and get the following error:
> >
> >$ dbaccess dbname@dbserver filename.spl> >Database selected.
> >
> > 802: Cannot open file for run.> >
> >Database closed.
> >
> >I have the SPL file attributes set so that everyone can read/write/execute
> >and I am attempting this as the informix user.
> >KStout, kstout@masconsulting.com
>
> Try
>
> $ cat filename.spl | dbaccess dbname@dbserver -
I am bound to note that if you posted that to c.u.s you would
immediately be awarded the "Useless Use of Cat" award. Don't take
offence, it's the sort of 'humour' you get on a UNIX Shell group. ;-)
Any invocation of "cat file | command"
can be replaced with "command < file",
and that's my useless piece of information for you. :-)
Also, for those that said you must have a .sql suffix, it's just a
nice-to-have.
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |What year 2000 bug? year 2000 bug? |/// / ////|
| |year 2000 bug? year 2000 bug? year |// / /////|
| |2000 bug? year 2000 bug? year 1900 |/ ////////|
+----------------------+-----------------------------------+-----------+