CDO$HELP.HLB  —  CDO Commands, FETCH
    Format

      FETCH  FILE_ELEMENT  type-name  element-name  TO  file-name

1  –  Parameters

1.1  –  type-name

    Specifies the type of file element you are fetching. Valid types
    are MCS_BINARY or one of the binary subtypes. The binary subtypes
    are:

    o  MCS_ANALYSIS_DATA_FILE

    o  MCS_BINARY_TOOL

    o  MCS_C_SOURCE_FILE

    o  MCS_DIAGNOSTIC_FILE

    o  MCS_EXECUTABLE_FILE

    o  MCS_LISTING_FILE

    o  MCS_LOG_FILE

    o  MCS_OBJECT_FILE

    o  MCS_TEXT

    o  MCS_TEXT_TOOL

1.2  –  element-name

    Specifies the file element you are fetching.

1.3  –  file-name

    Specifies the name of an OpenVMS file that will be created by the
    FETCH command. You may include a device and directory with the
    name.

2  –  Description

    The FETCH command copies the contents of a file element to the
    OpenVMS file specified on the command line. You must use the
    SET CONTEXT command to define a current context before using the
    FETCH command.

    The OpenVMS file created by the FETCH command is available for
    both read and write access. It has no further connection to the
    file element from which it was copied or to the repository. You
    are responsible for maintaining the OpenVMS file.

3  –  Examples

  CDO> DEFINE PARTITION FIRST_BASELEVEL.
  CDO> DEFINE CONTEXT DEVELOPMENT_CONTEXT
  cont> BASE_PARTITION FIRST_BASELEVEL.
  CDO> SET CONTEXT DEVELOPMENT_CONTEXT
  CDO> DEFINE COLLECTION CLIENT.
  CDO> RESERVE COLLECTION CLIENT
  CDO> DEFINE FILE_ELEMENT MCS_TEXT_TOOL CLIENT_BUILD
  cont> STORETYPE INTERNAL. END.
  CDO> RESERVE FILE_ELEMENT MCS_TEXT_TOOL CLIENT_BUILD
  CDO> FETCH FILE_ELEMENT MCS_TEXT_TOOL CLIENT_BUILD(1)
  cont> TO BLD$:BUILD_CLIENT.COM
  CDO> REPLACE FILE_ELEMENT MCS_TEXT_TOOL CLIENT_BUILD

      In certain circumstances, you may want to use the FETCH command
      instead of the OPEN and CLOSE commands. This example shows how
      to use the FETCH command to access the contents of an earlier
      version of a file element that is currently reserved.
Close Help