Change Physical File Member (CHGPFM)
Where allowed to run: All environments (*ALL)
Threadsafe: NoParameters
Examples
Error messagesThe Change Physical File Member (CHGPFM) command changes the attributes of a physical file member.
Restrictions:
- To change a physical member, have object management (*OBJMGT) or object alter (*OBJALTER) authority for the physical file that contains the member, and execute (*EXECUTE) authority to the file library.
- No other user may be clearing or initializing the member, nor may any user be holding the file for exclusive use. Other users may have the member open, but the changes made to the member are not reflected in any open members. For the changes in open members to be effective, first close the member (this must be a full close if the member is open SHARE(*YES)) and then open it again.
Top
Parameters
Keyword Description Choices Notes FILE Physical file Qualified object name Required, Key, Positional 1 Qualifier 1: Physical file Name Qualifier 2: Library Name, *LIBL, *CURLIB MBR Member Name, *FIRST Required, Key, Positional 2 SRCTYPE Source type Simple name, *SAME, *NONE Optional EXPDATE Expiration date for member Date, *SAME, *NONE Optional SHARE Share open data path *SAME, *YES, *NO Optional TEXT Text 'description' Character value, *SAME, *BLANK Optional
Top
Physical file (FILE)
Specifies physical file that contains the member to be changed.
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 thread is used to locate the file. If no library is specified as the current library for the job, the QGPL library is used.
- name
- Specify the name of the library to be searched.
Top
Member (MBR)
Specifies the member to be changed.
This is a required parameter.
- *FIRST
- The first member of the specified file is used.
- name
- Specify the name of the physical file member to be changed.
Top
Source type (SRCTYPE)
Specifies the source type of a member if this is a source file. The source type option is a character string of no more than 10 characters representing a name. The first character must be alphabetic (including the characters $, @, or #), and the remaining characters must be alphanumeric or an underline.
The user of this command must assure the validity of the source type option.
The source type option can only be used with this command to change the source type attribute of a source file member.
- *SAME
- The value does not change.
- *NONE
- No source type is specified.
- simple-name
- Specify the source type of a member.
Top
Expiration date for member (EXPDATE)
Specifies the expiration date. The files cannot be overwritten until the expiration date. The expiration date must be later than or equal to the current date.
- *SAME
- The expiration date of the member does not change.
- *NONE
- The member has no expiration date.
- date
- Specify the date after which the member cannot be used. The date is specified in the job-date format.
Top
Share open data path (SHARE)
Specifies whether the open data path (ODP) is shared with other programs in the same routing step. When an ODP is shared, the programs accessing the file share facilities such as the file status and the buffer.
- *SAME
- The ODP sharing value of the member does not change.
- *NO
- The ODP is not shared with other programs in the routing step. A new ODP for the file is created and used every time a program opens the file.
- *YES
- The same ODP is shared with each program in the job that also specifies *YES when it opens the file.
Top
Text 'description' (TEXT)
Specifies the text that briefly describes the object.
- *SAME
- The text that describes the member does not change.
- *BLANK
- No text is specified.
- character-value
- Specify no more than 50 characters of text, enclosed in apostrophes.
Top
Examples
CHGPFM FILE(QGPL/INV) MBR(FEB) EXPDATE('10/31/90')This command changes the member named FEB in the physical file INV in the QGPL library so that the expiration date of the member is now October 31, 1990 (assuming the job date format is mm/dd/yy).
Top
Error messages
*ESCAPE Messages
- CPF3288
- Member &3 file &1 in &2 not changed.
Top