ALLBASE/SQL FORTRAN application programs have the same stages of
development as any application program. They originate as
FORTRAN source code files that are subsequently compiled with
the FORTRAN compiler and linked by the system linker to create
an executable program file. The development of ALLBASE/SQL
programs, however, requires that you preprocess those
portions of the program that contain SQL commands before
compilation.
In the case illustrated in Title not available, the ALLBASE/SQL
FORTRAN program consists of one source file and one user include
file. The preprocessor merges any user include file into the
source program, and preprocesses it. The result is a modified
source code file and a preprocessor generated include file. This
preprocessor include file contains all of the definitions of
variables used by any FORTRAN statements in the modified source
code file. These two files are then compiled to produce an
object code module, and linked to produce an executable program
file, in the same manner as any other FORTRAN program.
In other cases, the ALLBASE/SQL application program might
consist of a main program unit and one or more subprogram units
in separate files. In these cases, only source files containing
embedded SQL code need to be preprocessed, as illustrated in
Title not available. However, each program unit which contains SQL
commands must be preprocessed and compiled before the next
program unit is preprocessed. Separately preprocessed program
units that are not immediately compiled will write over each
other's preprocessor created include file and consequently
create an error when compiled. You invoke the FORTRAN
preprocessor and compiler as many times as necessary to create
the desired number of object code modules.
During preprocessing, the FORTRAN preprocessor actually accesses
the same DBEnvironment to be used by your main program or
subprogram unit at runtime. The preprocessor stores a module in
the DBEnvironment which is executed at runtime. The module is
used at runtime to optimize and validate DBEnvironment
operations.