DTRHELP.HLB  —  Commands Statements Clauses, : (EXECUTE)
       Invokes a DEC DATATRIEVE procedure.

       Format

         { :       }
         {         }  procedure-name
         { EXECUTE }
         {         }

1  –  Argument

    procedure-name

       Is the given name, full dictionary path name, or relative
       dictionary path name of the DEC DATATRIEVE procedure you want
       to invoke.

2  –  Examples

       The following example invokes a procedure to find the employee in
       PERSONNEL with the largest salary. It uses EXECUTE to invoke the
       procedure from the DIGITAL Command Language (DCL) level. In this
       example, DTR is the global symbol for invoking DEC DATATRIEVE.

       DTR> SHOW MAX_SALARY
       PROCEDURE MAX_SALARY
       READY PERSONNEL
       PRINT PERSONNEL WITH SALARY = MAX SALARY OF PERSONNEL
       END_PROCEDURE

       DTR> EXIT
       $ DTR EXECUTE MAX_SALARY

                          FIRST  LAST         START              SUP
        ID     STATUS     NAME   NAME  DEPT   DATE      SALARY   ID

       00012 EXPERIENCED CARLA  SPIVA  TOP 12-Sep-1972  $75,892 00012

       $

       The following example invokes a procedure three times. The
       procedure displays employees in a given department with salaries
       greater than $40,000.

       DTR> SHOW BIG_SALARY
       PROCEDURE BIG_SALARY
       FOR PERSONNEL WITH DEPT  = *."the department"
       BEGIN
         IF SALARY GT 40000
         THEN PRINT ID, NAME, DEPT,START_DATE, SALARY
       END
       END_PROCEDURE

       DTR> REPEAT 3
       CON> BEGIN
       CON>    :BIG_SALARY
       CON> END
       Enter the department: F11

               FIRST       LAST            START
        ID     NAME        NAME    DEPT    DATE     SALARY

       00891 FRED       HOWL       F11   9-Apr-1976 $59,594
       78923 LYDIA      HARRISON   F11  19-Jun-1979 $40,747

       Enter the department: T32

       38462 BILL       SWAY       T32   5-May-1980 $54,000
       83764 JIM        MEADER     T32   4-Apr-1980 $41,029

       Enter the department: TOP

       00012 CHARLOTTE  SPIVA      TOP  12-Sep-1972 $75,892

       DTR>

       The following example invokes a procedure to specify an edit
       string clause for a variable:

       DTR> DEFINE PROCEDURE E_S
       DFN> EDIT_STRING IS $$,$$$.99
       DFN> END_PROCEDURE
       DTR> DECLARE PRICE_PER_FT COMPUTED BY PRICE/LOA :E_S.
       DTR> PRINT TYPE, PRICE_PER_FT OF FIRST 5 YACHTS

                                 PRICE
                                  PER
       MANUFACTURER   MODEL       FT

        ALBERG      37 MK II     $998.68
        ALBIN       79           $688.46
        ALBIN       BALLAD       $916.67
        ALBIN       VEGA         $688.89
        AMERICAN    26           $380.58

       DTR>
Close Help