RDOHELP72.HLB  —  Preprocessors
    Oracle Rdb preprocessors check and process Oracle Rdb statements in
    your program, converting the Oracle Rdb statements to host language
    calls to the database. RDBPRE, the preprocessor for BASIC, COBOL,
    and FORTRAN, automatically invokes the necessary host language
    compiler for your program. You must invoke the host language
    compiler after you preprocess a C or Pascal program with the RDML
    preprocessor.

1  –  Callable RDO

    Callable RDO is a program interface that you must use when Oracle Rdb
    does not support a preprocessor for your program language.  You can also
    use this interface when you want to perform Rdb data definition tasks or
    dynamic data manipulation tasks in BASIC, C, COBOL, FORTRAN, or Pascal
    programs.

    When you use the Callable RDO program interface, your program
    communictes with Oracle Rdb using a callable function, RDB$INTERPRET.
    Unlike preprocessor interfaces, the Callable RDO interface performs in
    an interpretive manner.

    The Rdb statements you use in your pgoram are string literals.  When the
    program executes, the statements are passed to Oracle Rdb in the calls
    to RDB$INTERPRET.  The interactive Rdb interface, RDO, then interprets
    and executes them.

    You call the RDB$INTERPRET function as you would call a VMS Run-Time
    Library routine.  In the calling sequence, you pass both Rdb statements
    and host language variables that cuase values from teh database to be
    retrieved or updated.  The call to RDB$INTERPRET returns a status value
    that indicates the success or failure of the statements.  If the call
    was successful, RDB$INTERPRET also returns retrieved database values to
    the appropriate program variables.

    For more information, refer to the Guide to Using RDO, RDBPRE, and
    RDML.

1.1  –  Restriction

    If the program that uses Callable RDO (RDB$INTERPRET) is linked
    implicitly with SYS$SHARE:RDBINTSHR (that is, allows the OpenVMS Linker
    utility (LINKER) to resolve the reference using
    SYS$LIBRARY:IMAGELIB.OLB) then the message vector and transaction handle
    values are not returned to the caller.

    However, if the program is linked explicitly with SYS$SHARE:RDBINTSHR
    as the following example shows, then message vector and transaction
    handle values are returned.  In this case, there must be two PSECTs
    declared and named RDB$TRANSACTION_HANDLE (8 bytes long) and
    RDB$MESSAGE_VECTOR (20 longwords, that is, 80 bytes long) in the
    caller's program.

    $ LINK PROGRAM,SYS$INPUT/OPT
    SYS$SHARE:RDBINTSHR.EXE/SHARE
    PSECT_ATTR=RDB$MESSAGE_VECTOR,SHR
    PSECT_ATTR=RDB$TRANSACTION_HANDLE,SHR

    However the explicit linking against the shareable image
    SYS$SHARE:RDBINTSHR is not upward compatible and the application will
    need to be relinked for each new version of Oracle Rdb released.

    There is no workaround for this problem.

2  –  RDBPRE

    You can define a symbol to invoke RDBPRE. Once you are in the
    RDBPRE environment, you can specify the programming language and
    the input file specification. For example:

    $ RDBPRE :== $RDBPRE
    $ RDBPRE
    INPUT FILE> MYPROG.RFO/FORTRAN

    A more convenient method is to define a symbol that invokes a
    particular preprocessor. For example, if you frequently use
    the preprocessor with FORTRAN data manipulation language (DML)
    programs:

    $ RFOR :== $RDBPRE/FORTRAN
    $ RFOR MYPROGRAM.RFO

2.1    /BASIC

    Specifies that the input file is a BASIC source file. Following
    successful RDBPRE preprocessing, the resulting file is submitted
    automatically to the BASIC compiler.

2.2    /COBOL

    Specifies that the input file is a COBOL source file. Following
    successful RDBPRE preprocessing, the resulting file is submitted
    automatically to the COBOL compiler.

2.3    /FORTRAN

    Specifies that the input file is a FORTRAN source file. Following
    successful RDBPRE preprocessing, the resulting file is submitted
    automatically to the FORTRAN compiler.

2.4    /INITIALIZE_HANDLES

    The /[NO]INITIALIZE_HANDLES qualifier allow you to control
    whether RDBPRE will initialize RDBPRE-supplied database,
    transaction, and request handles. Use of the /NOINITIALIZE_
    HANDLES qualifier allows you to link a main image against a
    shareable image and share handles between the two.

           Format:
                  /INITIALIZE_HANDLES     (Default)
                  /NOINITIALIZE_HANDLES

    These qualifiers have no effect on whether or when handles are
    cleared in the generated code; they only control initialization
    of handles in declarations. Furthermore, they only affect
    database, transaction and request handles that RDBPRE declares.
    User-specified transaction and request handles will not be
    initialized when you use the /INITIALIZE_HANDLES qualifier.

    In RDBPRE when you use the /NOINITIALIZE_HANDLES qualifier,
    any handle you specify in your application program must also
    be specified in the shareable image.

3  –  RDML

    You can define a symbol to invoke the Relational Data
    Manipulation Language (RDML) preprocessor. For example:

    $ RDML :== $RDML
    $ RDML
    _Source file: SAL_HISTORY.RC

    A more convenient method is to define symbols. For example:

    $ RDMLC    :== $RDML/C
    $ RDMLPAS  :== $RDML/PASCAL
    $!
    $ RDMLC SAL_HISTORY.RC

    See the RDML Help module that is available from DCL level for
    details.
Close Help