Remove

PURPOSE:  The REMOVE command deletes (1) DBL entries for the specified objects, along with any text or associated System Files; (2) only the entries for the specified objects from the Data Base Library; or (3) only the text of the specified objects from the DBL.

Syntax

FORM 1:

REMOVE {DI, DS, FS, SF, CF, CM, CS, DI, GS, ID, PM, SD, SI}\name list\[IN DBL dbl_name]

FORM 2:

REMOVE ENTRY FOR {DI, DS, FS, SF}\name list\ [IN DBL db_.name]

FORM 3:

REMOVE TEXT FOR {CF, CM, CS, DI, GS, ID, PM, SD, SI} \name list\ [IN DBL dbl_name]

FORM 4:

REMOVE SF "string_literal"

object types

specifies the object type to be removed from the DBL, and also removes any associated System File.  Multiple names are separated by commas.  Object type can be any of the following:  CM, DBL, DI, DS, FS, GS, ID, PM, SD, SF, SI.

CM

is a Command Module.

CS

is a Code Segment.

DBL

may be used to specify an object not in the current DBL.

DI

is a Data Index.

DS

is a Data Set.

FS

is a Find Subset.  Any Find Subset can be deleted, whether it is cataloged in a DBL or not.

GS

is a Global Storage.

ID

is an Index Definition.

PM

is a Process Module.

SD

is a Schema Definition.

SF

is a System File.  Any System File can be deleted, whether it is cataloged in a DBL or not.

SI

is a System Information object.

[IN DBL dbl_name]

is used to remove an object from a DBL other than the current one.

ENTRY FOR

this clause in form 2 of the command removes the entry for the specified objects from the DBL, but does not delete the associated System Files.

TEXT FOR

removes the text of the specified objects from the DBL but leaves the compiled form, if any, available for use.  Any attempt to COPY, LIST, or MODIFY an object whose text has been removed results in an error message.  The STRUCTURE command is simply ignored when used on an SD with the text removed.

string_literal

is any specification of a set of files acceptable by the OpenVMS DCL DELETE command, used by form 4.

EXAMPLE

The following example corrects a field definition in the Schema Definition DISCOUNTS_DBM2.  Since the Data Set has a Data Index, the DI must be disassociated before the DS is.  The HOLD editing command removes the compiled code but not the text of the DI definition from the DBL.  After the Schema Definition is fixed, the Data Set is reattached, then the DI is stored with SAVE.

*MODIFY DI DISCOUNTS_DBM2
--HOLD
--STOP
*REMOVE ENTRY FOR DS DISCOUNTS_DBM2
*MODIFY SD DISCOUNTS_DBM2
--PRINT
00005   FORM IS ASCII
00010   DISCOUNT_TYPE,CHAR,30
00020   STORE_CODE,CHAR,4
00030   LOW_QTY,INT,6
00040   HIGH_QTY,INT,6
00050   DISCOUNT,FLOAT,3
-EDIT   10
00010   DISCOUNT_TYPE,CHAR,30

(Edit the line with the SLIM editor.)

--PRINT
00005   FORM IS ASCII
00010   DISCOUNT_TYPE,CHAR,40
00020   STORE_CODE,CHAR,4
00030   LOW_QTY,INT,6
00040   HIGH_QTY,INT,6
00050   DISCOUNT,FLOAT,3
--SAVE
*CREATE DS DISCOUNTS_DBM2 SD DISCOUNTS_DBM2 ATTACH
*MODIFY DI DISCOUNTS_DBM2
--SAVE

The next example illustrates how the REMOVE ENTRY command deletes the DBL entry for Data Set DISCOUNTS_DBM2 but not its associated System File.

*DIRECTORY OF DS
TYPE NAME
DS   DISCOUNTS_DBM2 SD DISCOUNTS_DBM2
DS   BOOKS_DBM2 SD BOOKS_DBM2
DS   AUTHORS_DBM2 SD AUTHORS_DBM2
*REMOVE ENTRY FOR DISCOUNTS_DBM2
*DIRECTORY OF DS
TYPE NAME
DS   BOOKS_DBM2 SD BOOKS_DBM2
DS   AUTHORS_DBM2 SD AUTHORS_DBM2
*LIST SF DISCOUNTS_DBM2.DS
First Time Customer   0000   0   0   11
Volume Customer   0000   100   1000   7
Good Customer   7238   0   0   5

NOTES:  [REMOVE DBL] Only the current DBL can be removed and only if there are no Data Sets in it.

[REMOVE DS] All associated Data Indexes must be removed before a Data Set can be removed.

[REMOVE SD] All associated Data Sets must be removed before a Schema Definition can be removed.

[REMOVE SF] System File entries in other DBL’s will not be removed.  Removing a System File should not be used to remove the current DBL as security features are bypassed.

If a DBL, Data Set, or Data Index is declared at the time of its removal, ACCENT R will subsequently respond as if no DBL, Data Set, or Data Index is currently declared.

The REMOVE ENTRY FOR command allows a Data Set to be disassociated from its Schema Definition so that minor modifications can be performed on a Schema Definition (see example).  Field lengths or number of decimal places should not be changed in this way.  However, field names can be changed, and some data type changes are allowed.  For example, data type A could be changed to data type CHAR, since the data type CHAR includes data type ALPHABETIC.  The reverse change would be allowed only if all values in the field are data type ALPHABETIC.  ACCENT R does not check the SD against the format of the Data Set when it is attached

The command REMOVE ENTRY FOR DI deletes the DI entry from the DBL but leaves the DI file intact.  If the DI is to be redefined later, the text of the DI should be copied to a System File (SF) before the entry is deleted.  Such an index is no longer considered current.  To disassociate a Data Index entry from the DI file, use the MODIFY DI command on the DI entry, type HOLD and STOP at the edit level.  Later, to re-associate the DI entry, simply use the MODIFY command and SAVE it at the edit level (see the example).

Using the command REMOVE SF "string_literal" makes it easier to remove a set of system files that were created for a specific application.

EXAMPLE

REMOVE SF ".TMPJ*"

This will delete all .TMP files in the connected directory.

SEE ALSO:  CREATE DS, MODIFY DI, and SLIM editing