DTRHELP.HLB  —  Commands Statements Clauses, DECLARE PORT Statement
       Creates a temporary DEC DATATRIEVE port with the name you specify
       and readies the port for WRITE access. DEC DATATRIEVE does not
       enter a definition of the port in the Oracle CDD/Repository data
       dictionary.

       Format

         DECLARE PORT  port-name USING

               level-number-1 field-definition-1.

               [level-number-2 field-definition-2.]
                      .          .
                      .          .
                      .          .
               [level-number-n field-definition-n.]
          ;

1  –  Arguments

    port-name

       Is the name of the port. It cannot duplicate a DEC DATATRIEVE
       keyword or the given name of any domain you may bring into your
       workspace.

    level-number

       Is the level number for the field in the port declaration. It
       indicates the relationship of the field to the other fields of
       the port.

    field-definition

       Is a field definition. A port declaration must have at least one
       field definition. Each field definition ends with a period.

    ; (semicolon)

       Ends the port declaration.

2  –  Example

       The following example shows a port declared for YACHTS records in
       a DEC Fortran program:

       CALL DTR$COMMAND (DAB,'DECLARE PORT BOAT_PORT USING
       1 01 YACHT.
       2    03 BOAT.
       3       06 BUILDER PIC X(9).
       4       06 MODEL PIC X(10).
       5       06 RIG PIC X(6).
       6       06 LOA PIC X(3).
       7       06 DISP PIC X(5).
       8       06 BEAM PIC XX.
       9       06 PRICE PIC X(5).;')
Close Help