sqlrun32.exe - is Win32 console executable to process sql scripts on remote Informix server. It requires installed Informix Client Software on the client site. Syntax for using sqlrun32 is sqlrun32 options filename The "filename" is a source file .sql (default) or .mak type. For .sql file sqlrun32 sequentially execute all contained sql statements during one session. For .mak file sqlrun32 process all files listed in a .mak as .sql files. All .sql files process during one session. (Good practice is open and close database in each .sql file). A .mak file can contain a list of .sql files. Each file must be specified on separate line. Blank lines allowed in the file. The '--' string at the beginning of the line comments contents of the line. If file extension is not specified, it use "sql" as a default extension. A searching of .sql files perfoms in the current directory and directories specified in environment variable SQLPATH. A .sql file can contain one or more SQL statements. Allowed only SQL statements that not return data. Example of allowed SQL: DATABASE mydb; INSERT INTO table_name VALUES (0, 1, 2); CREATE TABLE abc (c INT); EXECUTE PROCEDURE proc1(); -- if SP proc1 doesn't return values SELECT * FROM a INTO TEMP b; CLOSE mydb; Example of not allowed SQL: SELECT * FROM a; EXECUTE PROCEDURE proc2(); -- if SP proc2 return a row Some SQL statements can't be executed (for example CONNECT, DISCONNECT) SQL statements in the file can be separated by ';' (as dbaccess input files) or '$' (like ESQL/C), see options. When ';' used sqlrun32 itself find SP declaration and distinguish ';' used as a SQL and SPL stmt delimiter. If errors encounters while SQL statement being processed, error message will be printed standard error stream and sqlrun32 stopped. Format of error message: SQL error: filename(lineno) column colno, statement stmtno SQLCODE: sqlerr, ISAM: isamerr Error message where filename - full source file pathname lineno - error line number from beginning of source file colno - column number from beginning of line stmtno - statement number from beginning of source file sqlerr - SQL error number isamerr - ISAM error number Options /c:SERVERNAME contain SERVERNAME to connect to. By default connects to INFORMIXSERVER /ni if specified it not asks enter any character at the end of processing /ep exclude preproecssing /i:e1,e2,.. ignore specified error numbers while processing sql /rp execute 'create procedure' stmt like Oracle 'create or replace' /rv execute 'create view' stmt like Oracle 'create or replace' /s used '$' as a SQL statement delimiter For example: $UPDATE a SET b=1 WHERE c=2 $DELETE FROM c /t used ';' as a SQL statement delimiter and transparently for '$' For example: $UPDATE a SET b=1 WHERE c=2; $DELETE FROM c; /d used ';' as a SQL statement delimiter For example: UPDATE a SET b=1 WHERE c=2; DELETE FROM c; /p Print log messages in standard output for every SQL statement Preprocessor sqlrun32 has built-in preprocessor capabilities like C preprocessor. It support following directives: #include no difference between #include and #include "file.h". Searching of .h files perfoms in the current directory and directories specified in environment variable INCLUDE. #define Only definition of constants allowed. #udef #ifdef #ifndef #else #endif sqlrun32 is not compiler. It is a interpretator. It not do any dependencies checking. example.mak, example.sql, example.h is a example source files. All files can contain comments beginning with -- (to end of line) Pls. send any comments and suggestions to Andrew Svikhnushin e-mail: san@inist.ru