DTRHELP.HLB  —  Commands Statements Clauses, DEFINE PROCEDURE Command
       Enters a procedure definition into the Oracle CDD/Repository data
       dictionary system and creates an access control list (ACL) for
       the procedure.

       Format

         DEFINE PROCEDURE  procedure-name

               .
               .
               .

         END_PROCEDURE

1  –  Arguments

    procedure-name

       Is the given name, full dictionary path name, or relative
       dictionary path name of the procedure you want to define. The
       path name cannot resolve to the full dictionary path name of any
       other object or directory in the data dictionary. Procedures can
       be defined in either the DMU or CDO dictionary.

    END_PROCEDURE

       Ends the procedure definition.

2  –  Examples

       The following example shows how to define a procedure to set
       your default directory to the DEMO directory, which contains the
       sample data for the YACHTS, OWNERS, and FAMILIES domains:

       DTR> DEFINE PROCEDURE DEMO
       DFN> SET DICTIONARY CDD$TOP.DTR$LIB.DEMO
       DFN>     SHOW DICTIONARY
       DFN> END_PROCEDURE
       DTR> :DEMO
       The default directory is CDD$TOP.DTR$LIB.DEMO
       DTR>

       The following example shows how to define a procedure that
       displays a group of boats with a price less than a figure you
       supply when the procedure runs:

       DTR> DEFINE PROCEDURE PRICE_LIST
       DFN>     READY YACHTS
       DFN>     PRINT SKIP, COL 20,
       DFN>           '*** Price List of YACHTS ***', SKIP
       DFN>     FOR YACHTS WITH PRICE NE 0 AND
       DFN>         PRICE LE *.'the ceiling price'
       DFN>           PRINT BOAT
       DFN>     PRINT SKIP, COL 10, 'See anything interesting?'
       DFN> END_PROCEDURE
       DTR> :PRICE_LIST

                          *** Price List of YACHTS ***

       Enter the ceiling price: 5,000

                                      LENGTH
                                       OVER
       MANUFACTURER   MODEL     RIG    ALL   DISPLACEMENT BEAM  PRICE

        CAPE DORY   TYPHOON    SLOOP   19        1,900     06   $4,295
        VENTURE     21         SLOOP   21        1,500     07   $2,823
        VENTURE     222        SLOOP   22        2,000     07   $3,564
        WINDPOWER   IMPULSE    SLOOP   16          650     07   $3,500

                See anything interesting?

       DTR>

       The following example shows how to use a OpenVMS command line to
       invoke the procedure created in the first example:

       $ DTR32 EXECUTE DEMO
       The default directory is CDD$TOP.DTR$LIB.DEMO

       $
Close Help