Create procedure from esql
Posted in 1999
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Hi All I got some program fromInformix Guide to SQL #include <stdio.h> #include <string.h> $include sqlca; $include sqlda; $include datetime; main() { $database cl_default; $create procedure from "file_name" ; } Is it possible to change "file_name" .I tried to put argv[1] with some other file name but it doesn't accept it.may be there is some way to do it. Thank you Regards Igor
What about that (not tested, but said in the manual) define filename char(128) $database cl_default; let filename = arg_val[1] $create procedure from filename; Hth, Chris
Christian Brauer wrote:
>
> What about that (not tested, but said in the manual)
>
> define filename char(128)
>
> $database cl_default;
> let filename = arg_val[1]
> $create procedure from filename;
An interesting hybrid of I4GL and ESQL/C.
int main(int argc, char **argv)
{
$ char *filename = argv[1];
if (argc != 2)
{
fprintf(stderr, "Usage: %s filename\\n", argv[0]);
return(1);
}
$ whenever error stop;
$ database c1_default;
$ create procedure from $filename;
return(0);
}
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
> An interesting hybrid of I4GL and ESQL/C. Puhh, I think I forgot to use Java and Assembler in that little proggy... gosh that week was far to busy for mee. Never mind, new tries this week Chris, the clown