[next] [previous] [contents]

  22.4 Creating Relationships for Referenced Dictionary
          Entities

  The compiler can create a relationship between a compiled
  module entity and any dictionary entity that a program
  references (such as a VAX Rdb/VMS database or a form def-
  inition). The referenced dictionary entity is not copied to the
  program. Instead, the compiled program references the dic-
  tionary entity at run time or with the help of a preprocessor.

  To create relationships for referenced dictionary entities in
  a BASIC program, use the %REPORT %DEPENDENCY
  lexical directive in the source program and specify the
  /DEPENDENCY_DATA qualifier when you compile the
  program. The format is as follows:
  %REPORT %DEPENDENCY "pathname" ["relationship-type"]

  The "pathname" parameter identifies the dictionary item that
  the compiled object module references. The path name can
  specify a CDO-format dictionary item (with an anchor as
  the first element), or it can specify a CDO-format item in
  the compatibility dictionary (which can be specified either as
  a CDD$TOP path name or as an anchor path name). See
  
Section 22.2.2 for a full description of the path name options.

  The optional ``relationship-type'' parameter determines the
  type of relationship by specifying a CDD/Repository protocol.
  There are many valid values; refer to the CDD/Repository
  documentation for full information. The most commonly
  used relationship for BASIC users is as follows:
  CDD$COMPILED_DEPENDS_ON

  This specifies a relationship that links a compiled object mod-
  ule to the element that goes into the compilation. This is the
  default.

  The %REPORT %DEPENDENCY directive is meaningful
  only when the following conditions are true:

  .
        The /DEPENDENCY_DATA qualifier is specified in the
        BASIC command line. (If it is not specified, the compiler
        checks syntax but does not update the dictionary to reflect
        this usage of the item.)
  .
        The current CDD$DEFAULT dictionary points to a
        directory in a CDO dictionary.
  .
        The dictionary item specified by pathname is in a CDO-
        format dictionary. (No relationship can be created in a
        DMU-format dictionary.)

  Suppose the BASIC program DOG_REPORT.BAS contains
  the following directive:
  %REPORT %DEPENDENCY "DISK1$:[CDDPLUS.BASIC]SMITH.DOG_DATABASE"

  Use the /DEPENDENCY_DATA qualifier when you compile
  the program:
  $ BASIC/DEPENDENCY_DATA DOG_REPORT

  After the compilation, the dictionary contains the following:
  
EXAMPLE: Click to display example.