Static Conversion Mode Syntax Specification [ ALLBASE/SQL Release F.0 Application Programming Bulletin for MPE/iX ] MPE/iX 5.0 Documentation
ALLBASE/SQL Release F.0 Application Programming Bulletin for MPE/iX
Static Conversion Mode Syntax Specification
Use one of the following statements to both check SQL syntax and create
output files that can be processed by the compiler. All static SQL
statements are converted to dynamic statements. Dynamic SQL statements
remain dynamic. No module is created, and no DBEnvironment is connected
to during preprocessing.
Static Conversion Mode for C Applications
RUN PSQLC.PUB.SYS;INFO= "(DYNAMIC)"
Static Conversion Mode for Pascal Applications
RUN PSQLPAS.PUB.SYS;INFO= "(DYNAMIC)"
Parameters
DYNAMIC indicates that all static SQL statements are to
be converted to dynamic statements, dynamic
statements remain dynamic, and a module is not
created. DYNAMIC can be specified in upper
and/or lower case.
Description
1. The complete set of ALLBASE/SQL syntax can be preprocessed in
static conversion mode with the following execeptions:
* Any DECLARE CURSOR statements must be located in an
executable portion of the code. In the C language, for
example, you would declare the cursor within curly brackets
following any data declaration statements within a given
block. For Pascal, position the statement within a
BEGIN/END block.
* Static host variables in the source code (except for those
used in a BULK FETCH or BULK SELECT statement) are
converted to dynamic parameters. Therefore, such static
host variables must adhere to the specifications for
dynamic parameters. For further information, refer to the
"Using Parameter Substitution in Dynamic Statements"
chapter in this document.
Authorization
At run time, the owner of any unqualified object defaults to the user who
is running the application.
Example of Static Conversion Processing of a C Application
RUN PSQLC.PUB.SYS;INFO=" (DYNAMIC)"
Example of Static Conversion Processing of a Pascal Application
RUN PSQLPAS.PUB.SYS;INFO=" (DYNAMIC)"
Before running the preprocessor, remember to equate SQLIN to the name of
the file containing the application you want to preprocess. After
running the preprocessor, save and rename any output files you do not
want overwritten.
MPE/iX 5.0 Documentation