The DELETE-ELEMENT statement deletes the specified members in the assigned library (logical deletion). The directory entries are thereby deleted and storage space is released (release is performed only within the library, i.e. the library as a whole does not become smaller).
A member of a library is deleted physically if the DESTROY=*YES parameter has been set or if the member contains a code for physical deletion or if the system parameter DESTLEV requires it.
The statement is executed only if a library has been specified explicitly in the statement or the library specified under OPEN-LIBRARY has been opened with MODE=*UPDAT.
The DELETE-ELEMENT statement is permitted for all member types.
Format
DELETE-ELEMENT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Operands
ELEMENT = *LIBRARY-ELEMENT(...)
Specifies the member to be deleted. Specifications for the desired member designation.
LIBRARY = *STD / <filename 1..54 without-vers> / *LINK(...)
Specifies the library from which the member is to be deleted.
LIBRARY = *STD
The library opened by OPEN-LIBRARY.
LIBRARY = <filename 1..54 without-vers>
Name of the library from which the member is to be deleted.
LIBRARY = *LINK(...)
The library assigned via the link name.
LINK-NAME = <structured-name 1..8>
Link name of the library.
ELEMENT = *ALL(...) /
<composed-name 1..64 with-under with-wild(132)>(...)
Name of the member to be deleted
ELEMENT = *ALL(...)
All members are deleted.
ELEMENT = <composed-name 1..64 with-under with-wild(132)>(...)
Name of the member to be deleted.
VERSION = *HIGHEST-EXISTING / *ALL / *UPPER-LIMIT /
<composed-name 1..24 with-under with-wild(52)>
Version of the member to be deleted.
VERSION = *HIGHEST-EXISTING
The member with the highest existing version is deleted.
VERSION = *UPPER-LIMIT
The highest possible version X'FF' in the library under the specified TYPE and name is deleted.
VERSION = <composed-name 1..24 with-under with-wild(52)>
Explicitly specifies the version of the member to be deleted.
TYPE = *DEFAULT / *ALL / <alphanum-name 1..8 with-wild(20)>
Type of the member to be deleted.
TYPE = *DEFAULT
If the value is *DEFAULT and the current value set with MODIFY-DEFAULTS is *NONE, LMSCONV requires a type specification.
TYPE = *ALL
All types are deleted
TYPE = <alphanum-name 1..8 with-wild(20)>
Only the specified type is deleted.
USER-DATE = *ANY / *TODAY / <date 8..10 with-compl> / *INTERVAL(...)
Date given by the user.
USER-DATE = *ANY
The member to be deleted has any date.
USER-DATE = *TODAY
The member with the current date is deleted.
USER-DATE = <date 8..10 with-compl>
The member whose date is entered explicitly in the form [YY]YY-MM-DD is deleted.
USER-DATE = *INTERVAL(...)
All members lying in the specified interval are deleted.
FROM = 1900-01-01 / <date 8..10 with-compl>
Beginning of interval.
TO = *TODAY / <date 8..10 with-compl>
End of interval.
CREATION-DATE = *ANY / *TODAY / <date 8..10 with-compl> / *INTERVAL(...)
Creation date of the member. For a description of the operands, see the USER-DATE operand of this statement.
MODIFICATION-DATE = *ANY / *TODAY / <date 8..10 with-compl> / *INTERVAL(...)
Date of the last modification to the member. For a description of the operands, see the USER-DATE operand of this statement.
DESTROY-DATA = *DEFAULT / *NO / *YES
Deletes the data for all members defined by *LIBRARY-ELEMENT.
DESTROY-DATA = *DEFAULT
The default value is *NO (see below) or the current value set with MODIFY-DEFAULTS.
DESTROY-DATA = *NO
A member of a library is physically deleted only if the member is marked for physical deletion or the system parameter DESTLEV requires it.
DESTROY-DATA = *YES
Following logical deletion, the data, if present, is deleted physically, i.e. overwritten with X'00'.
DIALOG-CONTROL = *DEFAULT / *NO / *YES
This operand specifies whether or not the execution of the statement is carried out interactively with the user.
DIALOG-CONTROL = *DEFAULT
The default value is *NO or the current value set with MODIFY-DEFAULTS..
DIALOG-CONTROL = *NO
All members are processed without dialog queries, i.e. without the user being able to take control.
Exception: If a member or a library is locked, LMSCONV inquires whether the attempt to access it shall be repeated.
DIALOG-CONTROL = *YES
LMSCONV prompts for confirmation on each member, e.g. process or skip member, or abort function.
For more detailed information on dialog control, see the MODIFY-DEFAULTS statement, where the value *ERROR which might have been set there has the same effect as *NO. Likewise, the value *ERROR which may have been set for DIALOG-CONTROL= in /INFORM-PROGRAM has the same effect as *NO with DELETE-ELEMENT.
Example
Member TEST3 is deleted from library LIB1.
/start-lmsconv //open-library lib1 //show-element-attributes INPUT LIBRARY= :N:$USER.LIB1 TYP NAME VER (VAR#) DATE NAME VER (VAR#) DATE (S) TEST1 @ (0001) <date> TEST2 @ (0001) <date> (S) TEST3 @ (0001) <date> TEST4 @ (0001) <date> //delete-element (elem=test3,type=s) //show-element-attributes INPUT LIBRARY= :N:$USER.LIB1 TYP NAME VER (VAR#) DATE NAME VER (VAR#) DATE (S) TEST1 @ (0001) <date> TEST2 @ (0001) <date> (S) TEST4 @ (0001) <date> . . .