Remove Member (RMVM)
Where allowed to run: All environments (*ALL)
Threadsafe: ConditionalParameters
Examples
Error messagesThe Remove Member (RMVM) command removes one or more members from the specified physical file or logical file. If the member is removed from a physical file, both the member and the member data are deleted from the system. If the member is removed from a logical file, the member and the access path to the data in the physical file member are deleted from the system.
Restrictions:
- If a member of another file is sharing the data of the member being deleted, the dependent member must be removed first.
- You must have object existence (*OBJEXIST) authority for the file that contains the member or members.
- This command is conditionally threadsafe. In multithreaded jobs, this command is not threadsafe for Distributed Data Management (DDM) files of type *SNA, when SYSTEM(*RMT) or SYSTEM(*FILETYPE) is specified.
Top
Parameters
Keyword Description Choices Notes FILE Data base file Qualified object name Required, Positional 1 Qualifier 1: Data base file Name Qualifier 2: Library Name, *LIBL, *CURLIB MBR Member Generic name, name, *ALL Required, Positional 2
Top
Data base file (FILE)
Specifies the physical file or logical file that contains the member or members to be removed.
This is a required parameter.
Qualifier 1: Data base file
- name
- Specify the name of the database file.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the job is used to locate the file. If no library is specified as the current library for the job, QGPL is used.
- name
- Specify the library where the file is located.
Top
Member (MBR)
Specifies the file member or members to be removed.
This is a required parameter.
- *ALL
- All members are to be removed from the specified file.
- generic-name
- Specify the generic name of the members to be removed from the file. A generic name consists of a character string that contains one or more characters followed by an asterisk(*). If a generic member name is specified, all members in the specified file that have names with the same prefix as the generic member name are removed.
- name
- Specify the name of the member to be removed from the file.
Top
Examples
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.
Top
Error messages
*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.
Top