Command reference / db
CLRPFM
Clear Physical File Member
Removes all data, including deleted records, from the specified member of a physical file. If ALLOCATE(*NO) was specified when the file was created, the member's record count is set to zero and its size to the minimum possible. If ALLOCATE(*YES) was specified, the member size is reset to the size used when the file was initially created.
Allowed environments: *ALL.
Positional parameters: 2.
Restrictions
- Conditionally threadsafe. In multithreaded jobs it is not threadsafe for distributed files. It is also not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA.
Parameters
FILE
Physical file
Specifies the physical file that contains the member to be cleared. Qualified as file name plus library name.
*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 current library is set, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Physical file
Physical file
Library
Library
Suggested / special values:
*LIBL, *CURLIB
MBR
Member
Specifies the name of the member to be cleared. The member is not cleared until all jobs using it, or using access paths over it, are finished with it.
Suggested / special values:
*FIRST, *LAST, *ALL
*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.
Examples
CLRPFM FILE(*CURLIB/INV) MBR(FEB)
Clears member FEB in physical file INV in the job's current library. It is not cleared until all jobs using the member, or its access paths, are done with it.
Generated from os/cl/catalog/CLRPFM.json and os/cl/help/CLRPFM.json.