VMS Help  —  MERGE  Specification File Qualifiers, /INCLUDE
    Specification File Qualifier

    Specifies record selection as well as multiple record formats.

    Formats

      /INCLUDE=(CONDITION=condition-name)

      [,KEY=...][,DATA=...]

1  –  Qualifier Values

 CONDITION=condition-name

    Refers to the condition-name specified in a previous /CONDITION
    qualifier.

 KEY=...

    Defines a key field because the default record type defined in
    the /KEY qualifier is not being used.

 DATA=...

    Defines a data field because the default record type defined in
    the /DATA qualifier is not being used.

2  –  Full Description

    You can specify that records are to be conditionally included
    in an output file. After defining a condition in a /CONDITION
    qualifier, specify record selection in an /INCLUDE qualifier
    requesting that records satisfying the condition are to be
    included in the output file.

    You can specify multiple /INCLUDE and /OMIT qualifiers in
    a specification file. The order in which you specify them
    determines the order the input records are tested for inclusion.
    After the last /INCLUDE qualifier, all records that have not
    already been included or explicitly omitted are omitted.

    You can unconditionally include any records not previously
    omitted or included by specifying /INCLUDE without a condition.

    When sorting multiple record formats, one /INCLUDE qualifier
    should be specified for each different record format among the
    records to be sorted. If you do not specify a KEY option within
    the INCLUDE qualifier, Sort assumes the default key definitions.
    If the KEY is specified in the /INCLUDE qualifier, the default
    key definitions are not used. The order of the KEY fields in the
    /INCLUDE qualifier determines how the internal key is built for
    sorting. The order of the DATA fields in the /INCLUDE qualifier
    determines the way the output record is formatted. If you specify
    a key or data field in an /INCLUDE qualifier, you must define all
    other key or data fields in the record.

3  –  Example

  /FIELD=(NAME=ZIP,POSITION:20,SIZE:6)
  /CONDITION=(NAME=LOCATION,
              TEST=(ZIP EQ "01863"))
  /INCLUDE=(CONDITION=LOCATION)

      These /CONDITION and /INCLUDE qualifiers specify that records
      with the zip code 01863 will be included in the output file.
Close Help