VMS Help  —  SQLMOD72
    The SQL module language and SQL module processor allow procedures
    that contain SQL statements to be called from any host language,
    including those not supported by the SQL precompiler.

    The SQL module language provides a calling mechanism for host
    language programs to execute SQL statements contained in a
    separate file called an SQL module file. The file contains module
    language elements that specify a single SQL module. The module
    includes one or more procedures. A procedure can contain a:

    o  Simple statement, which consists of a single SQL statement and
       optional parameter declarations

    o  Compound statement, which can include local variable
       declarations, multiple SQL statements, flow control
       statements, and transaction management statements

    A procedure that contains a single SQL statement is called a
    simple-statement procedure. A procedure that contains a compound
    statement, which can contain multiple SQL statements, is called a
    multistatement procedure.

    The host language program uses call statements to specify a
    particular SQL module procedure and supplies a sequence of actual
    parameters that corresponds in number and in data type to the
    parameter declarations in the procedure. A call to a procedure
    in an SQL module causes the simple or compound statement in the
    procedure to be executed.

    Oracle Rdb recommends using SQL module language, rather than
    precompiled SQL, because module language offers the following
    advantages:

    o  Module language allows procedures that contain SQL statements
       to be called from any host language. In contrast, the SQL
       precompiler only supports a subset of host languages: Ada, C,
       COBOL, FORTRAN, Pascal, and PL/I.

    o  Programs that use the SQL module language can isolate all
       SQL statements in SQL modules to improve modularity and avoid
       using two languages in the same source file.

    o  Programs can work around restrictions of the SQL precompiler
       by calling SQL modules:

       -  Programs that support pointer variables can take full
          advantage of dynamic SQL and use the SQLDA and SQLDA2 with
          the SQL module language.

       -  SQL module language does not restrict use of host language
          features not supported by the precompiler (such as pointer
          variables in C, block structure, macros, user-defined
          types, and references to array elements).

    o  Programs written in languages for which there is an ANSI
       standard can avoid embedding code that does not conform to
       the standard by isolating noncompliant SQL statements in SQL
       modules.

    For a detailed discussion of programming considerations for the
    SQL module language, see the Oracle Rdb Guide to SQL Programming.
Additional Information: explode extract
Environment Format Arguments Examples Character Parameters Host Language Data Types SQLMOD Command Line
Close Help