6. Embedded SQL for BASIC : Preprocessor Operation : Command Line Operations : The BASIC Compiler
 
Share this page                  
The BASIC Compiler
As previously mentioned, the preprocessor generates BASIC code. You should use the VMS basic command to compile this code. Most of the basic command line options can be used. You should not use the g_float or h_float qualifiers if floating-point values in the program are interacting with Ingres floating-point objects. If you use the byte or word compiler qualifiers, you must run the Embedded SQL preprocessor with the -i1 or -i2 flag. Similarly, use of the BASIC double qualifier requires that you have preprocessed your Embedded SQL file using the -r8 flag. Note, too, that many of the statements that the Embedded SQL preprocessor generates are BASIC language extensions provided by VAX/VMS. Consequently, you should not attempt to compile with the ansi_standard qualifier.
The following example preprocesses and compiles the file "test1". Note that both the Embedded SQL preprocessor and the BASIC compiler assume the default extensions.
$ esqlb test1
$ basic/list test1
VMS
As of Ingres II 2.0/0011 (axm.vms/00) Ingres uses member alignment and IEEE floating-point formats. Embedded programs must be compiled with member alignment turned on. In addition, embedded programs accessing floating-point data (including the MONEY data type) must be compiled to recognize IEEE floating-point formats.
The VMS default qualifier /g_float is not a standard and should not be used.
On Alpha systems, hardware support for D_float is only partial, the default has changed to G_float, and support for IEEE (IEEE 754-1985 standard for floating point arithmetic) has been added. Because of this, and because IEEE is available on other platforms and is recognized as an industry standard, Ingres for OpenVMS Alpha uses the IEEE format.
All programs and libraries should be compiled using the IEEE qualifier. Do not mix programs or libraries compiled with different qualifiers.
For example:
esqlb prog.sb
basic /float=ieee prog
Failure to use the /float=ieee qualifier or the use of non-IEEE float numbers will result in unpredictable results when non-IEEE floats are used as keys or in restrictions.
Note:  Check your Release Notes for any operating system specific information on compiling and linking ESQL/BASIC programs.