RMVM (Remove Member)
Purpose
The Remove Member (RMVM) command removes one or more members from the specified physical or logical file. Removing a physical file member deletes all the data in the member and frees the storage space allocated to that member and its access path. Removing a logical file member deletes its access path to the associated data stored in a physical file member.
Restrictions
- If a member of another file is sharing the data of the member being deleted, the dependent member must be removed first. To remove a member from a file, the user must have object existence authority for the file.
- In multithreaded jobs, this command is not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA, when SYSTEM(*RMT) or SYSTEM(*FILETPYE) is specified.
Required Parameters
- FILE
- Specifies the qualified name of the database file (physical or logical) that contains the member being removed.
The name of the file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
database-file-name: Specify the name of the database file that contains the member being removed.
- MBR
- Specifies the name of the physical or logical file member being removed. A specific or generic member name, or *ALL, can be requested.
*ALL: All members found in the specified file are removed.
member-name: Specify the specific name of the member removed.
generic*-member-name: Specify the generic name of the member. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. For more information on the use of generic names, refer to generic names.
Examples for RMVM
Example 1: Removing a File Member
RMVM FILE(JOBHIST1) MBR(JOBHIST1A)This command removes file member JOBHIST1A from file JOBHIST1. Library list *LIBL is used to find the file and member. If JOBHIST1 contains other members, they remain unchanged.
Example 2: Removing Members with Names that Start with SRC
RMVM FILE(QGPL/JOBHISTL) MBR(SRC*)This command removes all file members with names that start with SRC from file JOBHISTL in library QGPL.
Error messages for RMVM
*ESCAPE Messages
- CPF32CF
- Distributed file error, reason code &3.
- CPF32C3
- Distributed file error, level ID mismatch
- CPF320A
- Member &3 cannot be removed.
- CPF320B
- Operation was not valid for database file &1.
- CPF3203
- Cannot allocate object for file &1 in &2.
- CPF3220
- Cannot do operation on file &1 in &2.
- CPF3273
- File or member not created, deleted or changed.
- CPF7301
- &5 members not removed from file &2 in &3.
- CPF7310
- Member &1 not removed from file &2 in &3.