HELPLIB.HLB  —  CMS  COPY  CLASS
    Copies one or more existing classes to form one or more new
    classes. If you copy a class to the same library, the new
    class must have a different name. The COPY CLASS transaction
    preserves all class attributes and inserts element generations
    that belong to each input class. The elements to be inserted
    into the new class must already exist in the target library.

       Format:

          COPY CLASS  old-class-expression new-class-name "remark"

1  –  Command Parameters

 old-class-expression

    Specifies one or more existing classes to be copied. If you
    specify more than one class to be copied, you must use a
    wildcard character for the new class name. An old class
    expression can be a class name, a wildcard expression, or a
    list of these separated by commas.

 new-class-name

    Specifies the name for the new class. The name cannot be the
    same as any existing class name in the target library. Wildcards
    are allowed. If you specify more than one class with COPY CLASS,
    you must use a wildcard character for the new class name.

 remark

    Specifies a character string for the creation remark of the new
    class to be logged in the history file with this command. The
    remark is enclosed in quotation marks. If no remark was entered,
    then the remark from the old class is used for the creation
    remark of the new class, but a null remark ("") is logged in
    the history file.

2  –  Description

    The COPY CLASS command uses an existing library class to copy
    and create a new class in the same library or in another library.
    The original class is left unchanged. The class attributes are
    copied in full and an identical set of element generations are
    inserted into the new class. The elements to be inserted into
    the new class must already exist in the target library.

    CMS must be able to create one new class for each old class.
    When you use wildcards, or a comma list in the input class
    specification you must specify a wildcard ("*") as the output
    class specification.

3  –  Qualifiers

3.1    /CONFIRM

    Controls whether CMS prompts you for confirmation before each
    transaction.

    When you specify /CONFIRM and run CMS in interactive mode, CMS
    prompts you for confirmation. If you type YES, ALL, TRUE, or 1,
    CMS executes the transaction.  If you type NO, QUIT, FALSE, 0,
    or press RETURN or CTRL/Z, no action is performed. If you type
    any other character, CMS continues to prompt until you type an
    acceptable response.

    CMS does not prompt for confirmation in batch mode.

3.2    /LIBRARY[=directory-specification]

    Identifies a valid CMS library that is the location of the class
    specified by the old-class-expression parameter. When you
    specify an alternative library, the new-class-name parameter is
    optional. If you do not specify a value for /LIBRARY, the current
    CMS library is used.

3.3    /LOG (D)

    Controls whether CMS displays success and informational messages
    on the default output device. By default, if the command executes
    successfully, CMS displays a success message. If you specify
    /NOLOG, success and informational messages are suppressed. Any
    warning, error, or fatal error messages are displayed regardless
    of whether /LOG or /NOLOG is specified.

3.4    /OCCLUDE[=option,...]

    Controls whether CMS selects the first instance of the specified
    object, or all instances of the specified object in the library
    search list. The options field contains one or more keywords
    associated with the name of the object. The options field can
    contain the following keywords:

       ALL--equivalent to CLASS
       CLASS (D)
       NOCLASS
       NONE--equivalent to CLASS

    You can specify either ALL, NONE, or the [NO]CLASS keyword.

    By default, CMS performs occlusion for all objects; that is, CMS
    selects only the first occurrence of a specified object.

4  –  Example

        CMS> COPY CLASS INIT_CLASS INITX_CLASS "experimental version"
        %CMS-S-COPIED, class DISKX:[PROJECT.CMSLIB]INIT_CLASS copied
        to INITX_CLASS

      This command creates a new class named INITX_CLASS in the same
      library as the old class.
Close Help