CHGPFM (Change Physical File Member)

CHGPFM Command syntax diagram

 

Purpose

The Change Physical File Member (CHGPFM) command is used to change the attributes of a physical file member.

 

Restrictions

  1. To change a physical member, the user must have object management or object alter authority for the physical file that contains the member, and execute authority to the file library.
  2. 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.

 

Required Parameters

FILE
Specifies the qualified name of the physical file that contains the member to be changed.

The name of the physical file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

physical-file-name: Specify the name of the physical file.

MBR
Specifies the name of the member, or the first member (*FIRST) to be changed.

*FIRST: The first member in the database file is used.

physical-file-member-name: Specify the name of the physical file member to be changed.

 

Optional Parameters

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.

 

Notes

  1. The user of this command must assure the validity of the source type option.
  2. 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.

source-type: Specify the source type of a 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.

Note: An attempt to open a file member that has exceeded its expiration date causes an error message to be sent. A member that has exceeded its expiration date may be changed to not exceed its expiration date by changing the EXPDATE parameter. The expiration date must be later than or equal to the current day's date.

*SAME: The value does not change.

*NONE: No expiration date is specified.

expiration-date: Specify the date after which the member cannot be used. The date is specified in the format defined by the job attributes, DATFMT and DATSEP. The date is enclosed in apostrophes if special characters are used in the format.

SHARE
Specifies whether the open data path (ODP) for the physical file member is shared with other programs in the routing step. When an ODP is shared, the programs accessing the file share facilities such as the file status and the buffer.

More information on shared database files is in the Database Programming topic in the Information Center.

*SAME: The value does not change.

*NO: The ODP created by the program with this attribute is not shared with other programs in the routing step. Every time a program opens the file with this attribute, a new ODP to the file is created and activated.

*YES: The ODP created with this attribute is shared with each program in the routing step that also specifies SHARE(*YES) when it opens the file.

Note: When SHARE(*YES) is specified and control is passed to a program, a read operation in that program retrieves the next input record. A write operation produces the next output record.

TEXT
Specifies the text that briefly describes the physical file member. More information is in Commonly used parameters.

*SAME: The value does not change.

*BLANK: Text is not specified.

'description': Specify no more than 50 characters of text, enclosed in apostrophes.

Example for CHGPFM

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.

Error messages for CHGPFM

*ESCAPE Messages

CPF3288
Member &3 file &1 in &2 not changed.