CL Command Reference - CHGPF
CL Command List > CHGPF Reference
Description:
The Change Physical File (CHGPF) command changes the attributes of a physical file and all its members. The changed attributes are used for all members subsequently added to the file unless other values are specified or default for the add operation. To change the attributes of a specific member, specify the Change Physical File Member (CHGPFM) command.
Restrictions:
. You must have object management (*OBJMGT) authority or object alter (*OBJALTER) authority for the file and execute (*EXECUTE) authority to the library. An exclusive-no-read lock is required, which means no one can be using the file for any purpose.
. If a request to make an existing file re-use deleted records is made, but there are logical files over the physical file that specify ¡åFIFO¡å or ¡åLIFO¡å ordering for duplicate keys, the change is not allowed.
Examples:
Example 1: Changing Expiration Date for All Members
CHGPF FILE(QGPL/INV) EXPDATE(¡¯10/31/89¡¯)
This command changes the expiration date for all members in physical file INV to October 31, 1989.
Example 2: Changing File Size
CHGPF FILE(QGPL/DDMF) SIZE(*NOMAX) SYSTEM(*RMT)
This command changes the size of file INV located in the QGPL library on the remote system. Prior to specifying the above command, this user had created a DDM file by specifying the command CRTDDMF FILE(QGPL/DDMF) RMTFILE(QGPL/INV) RMTLOCNAME(AS400).
Example 3: Adding, Removing, and Changing Fields
CHGPF FILE(QGPL/T1) SRCFILE(QDDSSRC)
This command adds fields, removes fields, and changes field attributes based on the DDS in the source file member T1 in the source file QDDSSRC. Prior to specifying the above command, the user had edited the source member.