Deletes one or more generations of an element. Format: DELETE GENERATION element-expression "remark"
1 – Restrictions
o You cannot delete generation 1 of an element. o You cannot delete a generation that has variants off it. o You cannot delete a generation that has a review pending. o You cannot delete a generation that is reserved. o You cannot delete a generation that is in a class. o All generations in the specified range of generations to be deleted must be on the same line of descent. o You cannot use /GENERATION in combination with /AFTER, /BEFORE, /FROM, or /TO. o You cannot specify /AFTER and /FROM on the same command line. o You cannot specify /BEFORE and /TO on the same command line.
2 – Command Parameters
element-expression Specifies one or more generations of an element. An element expression can be an element name, a group name, a wildcard expression, or a list of these separated by commas. remark Specifies a character string to be logged in the history file with this command, usually used to explain why the command was entered. The remark is enclosed in quotation marks. If no remark was entered, a null remark ("") is logged.
3 – Description
The DELETE GENERATION command removes information about one or more generations of an element. Once a generation is deleted, it cannot be restored to its former place in the element in the CMS library. You can, however, archive the contents of the generation using the /ARCHIVE qualifier and later restore the contents of the generation. If the generation or range of generations to be deleted has a direct descendant generation (that is, a descendant generation on the same line of descent), then the changes associated with those generations are combined, and then those changes are combined with the changes in the descendant generation. If there is no descendant generation, that is, the generation or range of generations to be deleted is at the end of the line of descent, then the changes associated with those generations are discarded. You can specify a single generation with the /GENERATION qualifier. /GENERATION=1+ is the default. You can also specify a range of generations with either the /AFTER or /FROM qualifier to delimit the beginning of a range, and either the /BEFORE or /TO qualifier to delimit the end of a range. These sets of qualifiers can be paired to specify ranges with inclusive or exclusive endpoints (see the restriction section). If you delete the latest generation on the main line of descent of an element that has the reference copy attribute, CMS deletes the generation's reference copy and creates a new reference copy that corresponds to the generation that is now the latest generation on the main line of descent.
4 – Qualifiers
4.1 /AFTER[=generation-expression]
Specifies the start of a range of generations that are to be deleted, excluding the specified generation. You cannot specify both /AFTER and /FROM or both /AFTER and /GENERATION. You must specify the end of the range with either the /BEFORE or /TO qualifier.
4.2 /ARCHIVE=[file-specification]
Specifies a file to which CMS writes archived generation information. If the file specification is omitted, CMS creates a file for each with the same name as the element and the .CMS_ ARCHIVE file type and places it in your default directory.
4.3 /BEFORE[=generation-expression]
Specifies the end of a range of generations that are to be deleted, excluding the specified generation. You cannot specify both /BEFORE and /TO or both /BEFORE and /GENERATION. You must specify the start of the range with either the /AFTER or /FROM qualifier.
4.4 /CONFIRM (D)
Controls whether CMS prompts you for confirmation before each transaction. When you 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 or QUIT or press RETURN, 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.
4.5 /FROM[=generation-expression]
Specifies the start of a range of generations that are to be deleted, including the specified generation. You cannot specify both /FROM and /AFTER or both /FROM and /GENERATION. You must specify the end of the range with either the /BEFORE or /TO qualifier.
4.6 /GENERATION[=generation-expression]
Specifies a particular generation of the element to be deleted. By default, the most recent generation on the main line of descent is deleted. You cannot combine /GENERATION with any of the following qualifiers: /FROM, /TO, /AFTER, and /BEFORE.
4.7 /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.
4.8 /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 ELEMENT ELEMENT (D) NOELEMENT NONE--equivalent to NOELEMENT You can specify either ALL, NONE, or the [NO]ELEMENT keyword. By default, CMS performs occlusion for all objects; that is, CMS selects only the first occurrence of a specified object.
4.9 /TO[=generation-expression]
Specifies the end of a range of generations that are to be deleted, including the specified generation. You cannot specify both /TO and /BEFORE or both /TO and /GENERATION. You must specify the start of the range with either the /AFTER or /FROM qualifier.
5 – Examples
(1) CMS> DELETE GENERATION/NOCONFIRM SAMPLE.PAS/GENERATION=5B1 _Remark: Delete variant line %CMS-S-GENDELETED, 1 generation of element DISKX:[PROJECT.CMSLIB]SAMPLE.PAS deleted This command deletes generation 5B1 of the element SAMPLE.PAS. The /NOCONFIRM qualifier directs CMS to suppress the prompt confirming the operation. (2) CMS> DELETE GENERATION SAMPLE.*/AFTER=V1/BEFORE=V2 _Remark: delete generations between released versions Delete 5 generations after V1(1) before V2(7) of element SAMPLE.PAS? [Y/N] (N): Y %CMS-S-GENDELETED, 5 generations of element DISKX:[PROJECT.CMSLIB]SAMPLE.PAS deleted This command deletes all generations of the element after the generation in class V1 and before the generation in class V2, excluding the two generations in classes V1 and V2. (3) CMS> DELETE GENERATION SAMPLE.PAS/AFTER=1/BEFORE=V1 _Remark: delete a range %CMS-E-NOGENDELETED, no generations of DISKX:[PROJECT.CMSLIB]SAMPLE.PAS deleted -CMS-E-VARINRANGE, range has variants CMS> DELETE GENERATION/ARCHIVE/FROM=2A1/TO=2A1+/NOCONFIRM SAMPLE.PAS _Remark: delete the variant range and archive the deleted generations %CMS-S-GENDELETED, 3 generations of element DISKX:[PROJECT.CMSLIB]SAMPLE.PAS deleted The first command specifies that all generations be deleted between generation 1 and the generation in class V1. CMS could not delete the generations, however, because it found variants for the indicated generations. The second command specifies a range of generations to be deleted from and including the variant generation 2A1 to and including the latest variant generation of the element SAMPLE.PAS. In this case, CMS deleted 3 generations of the element. The /ARCHIVE qualifier directs CMS to save the deleted generations in an archive file in your default directory. To display the descendants of a generation and the classes containing the generations, use the SHOW GENERATION/DESCENDANTS/MEMBER command.