Clear Physical File Member (CLRPFM)
Where allowed to run: All environments (*ALL)
Threadsafe: ConditionalParameters
Examples
Error messagesThe Clear Physical File Member (CLRPFM) command removes all the data (including deleted records) from the specified member of a physical file. If *NO was specified for the Allocate storage (ALLOCATE) parameter when the file was created, the record count for the member is set to zero, and the member size is set to the minimum size possible. If *YES was specified for the ALLOCATE parameter when the file was created, the CLRPFM command resets the member size to the value used when the file was initially created is reset.
Restrictions:
- This command is conditionally threadsafe. In multithreaded jobs, this command is not threadsafe for distributed files. This command is also not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA.
Top
Parameters
Keyword Description Choices Notes FILE Physical file Qualified object name Required, Positional 1 Qualifier 1: Physical file Name Qualifier 2: Library Name, *LIBL, *CURLIB MBR Member Name, *FIRST, *LAST, *ALL Optional, Positional 2
Top
Physical file (FILE)
Specifies the physical file that contains the member to be cleared.
This is a required parameter.
Qualifier 1: Physical file
- name
- Specify the name of the physical 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, QGPL is used.
- name
- Specify the name of the library to be searched.
Top
Member (MBR)
Specifies the name of the member to be cleared.
- *FIRST
- The first member of the specified physical file is cleared.
- *LAST
- The last member of the specified physical file is cleared.
- *ALL
- All members of the specified physical file are cleared.
- name
- Specify the name of the physical file member to be cleared.
Top
Examples
CLRPFM FILE(*CURLIB/INV) MBR(FEB)This command clears the member named FEB in the physical file INV, found in the current library for the job *CURLIB. It is not cleared until all jobs currently using the member and all jobs using the access paths over the member are done with it.
Top
Error messages
*ESCAPE Messages
- CPF3130
- Member &2 already in use.
- CPF3133
- File &1 in library &3 contains no members.
- CPF3134
- Referential constraint error processing member &2.
- CPF3136
- File &1 in &3 not allowed on command.
- CPF3137
- No authority to clear, initialize, or copy member &2.
- CPF3141
- Member &2 not found.
- CPF3142
- File &1 in library &3 not found.
- CPF3144
- Member &2 not cleared or initialized.
- CPF3156
- File &1 in library &3 in use.
- CPF3157
- Triggers prevent requested operation.
- CPF3159
- Member &2 saved with STG(*FREE).
- CPF3160
- Operation on member &2 ended. Entry cannot be journaled.
- CPF3179
- Cannot clear or initialize DDM file &1 in &3.
- CPF32B8
- Distributed file error, reason code &3.
- CPF32CF
- Distributed file error, reason code &3.
- CPF32C3
- Distributed file error, level ID mismatch
- CPF320B
- Operation was not valid for database file &1.
- CPF3203
- Cannot allocate object for file &1 in &2.
Top