HP 3000 Manuals

Ch 1. Getting Started with ALLBASE/SQL Pascal Programming [ ALLBASE/SQL Pascal Application Programming Guide ] MPE/iX 5.0 Documentation


ALLBASE/SQL Pascal Application Programming Guide

Chapter 1  Getting Started with ALLBASE/SQL Pascal Programming 

The steps in creating a Pascal application program that accesses an
ALLBASE/SQL relational database environment (DBEnvironment) are
summarized in Figure 1-1 .

	       Click here to view figure.
          Figure 1-1.  Creating an ALLBASE/SQL Pascal Application Program 

Using your favorite editor, you create Pascal source code.  The source
code is a compilable Pascal program or subprogram that contains SQL
commands.  The SQL commands contained within the Pascal program are said
to be embedded.  Refer to the ALLBASE/SQL Reference Manual for SQL
terminology and usage rules.

Before compiling the source code, you preprocess it with the ALLBASE/SQL
Pascal preprocessor.  Preprocessing performs the following tasks:

   *   Checks the syntax of the SQL commands.

   *   Stores a module in the system catalog of the DBEnvironment to be
       accessed at run time.  A module consists of ALLBASE/SQL
       instructions for executing SQL commands in your program.

   *   Creates an installable module file.  This file contains a copy of
       the module stored in the DBEnvironment at preprocessing time.  You
       can use this file to install the module into another DBEnvironment
       in order to run the application program in that DBEnvironment.

   *   Generates Pascal constructs for executing the SQL commands and
       comments out the SQL commands.  Non-SQL constructs are ignored.
       This modified version of your source code is placed into a file
       created by the preprocessor, referred to as a modified source code 
       file.

   *   Creates four include files, which contain variable declarations,
       constant declarations, type declarations, and external procedure
       declarations that the preprocessor-generated Pascal constructs
       use.

You use the Pascal compiler and system linker to create the executable 
program from the modified source code file and the four include files.
The executable program automatically makes the appropriate database
accesses at run time in the DBEnvironment where the related module is
stored.



MPE/iX 5.0 Documentation