Add Physical File Member (ADDPFM)

Where allowed to run: All environments (*ALL)
Threadsafe: Conditional
Parameters
Examples
Error messages

The Add Physical File Member (ADDPFM) command adds a named member to a physical file, which must already exist on the system. The maximum number of members that can be added to the file is specified for the Maximum members (MAXMBRS) parameter on the Create Physical File (CRTPF) command or the Change Physical File (CHGPF) command. To add other members to the file, use the ADDPFM command to specify each one.

The number of members that can be added to the physical file is limited to the number specified for the MAXMBRS parameter of the associated CRTPF command. Each member added has the same attributes as those defined in the physical file, its own set of data records, and its own access path, as specified in the data description specifications (DDS). The access path determines the order in which the records in that member are processed.

Restrictions:

An *EXCLRD lock is required on the file to add a member. Because this command adds a member to a file in a library, the library must not be locked (*SHRNUP or *EXCLRD in the Allocate Object command) by another job.

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 Required, Positional 2
TEXT Text 'description' Character value, *BLANK Optional
EXPDATE Expiration date for member Date, *NONE Optional
SHARE Share open data path *NO, *YES Optional
SRCTYPE Source type Simple name, *NONE Optional

Top

 

Physical file (FILE)

Specifies the physical file to which the member is to be added.

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 physical file. If no library is specified as the current library for the job, QGPL is used.

name

Specify the library where the physical file is located.

Top

 

Member (MBR)

Specifies the file member to be added to the physical file. The file member name must be unique in the file.

If a DDM file is specified for the FILE parameter, and a member name is specified as part of the remote file name of the DDM file, the MBR name specified must match the member name in the remote file name in the DDM file.

This is a required parameter.

name

Specify the name of the file member to be added.

Top

 

Text 'description' (TEXT)

Specifies the text that briefly describes the object.

*BLANK

No text is specified.

character-value

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

Top

 

Expiration date for member (EXPDATE)

Specifies the expiration date of the physical file member.

*NONE

No expiration date is specified.

date

Specify the date after which the file member cannot be used. The date must be enclosed in apostrophes if date separator characters are used in the value.

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.

*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

 

Source type (SRCTYPE)

Specifies the source type attribute to be assigned to the new member. A source type can only be specified if the physical file was created using the Create Source Physical File (CRTSRCPF) command, or using the Create Physical File (CRTPF) command with *SRC specified for the File type (FILETYPE) parameter.

*NONE

No source type is specified.

character-value

Specify the source type for the file member. The source type is a character string of no more than 10 characters. The first character must be alphabetic (including the characters $, @, or #), and the remaining characters must be alphanumeric or an underline.

Top


 

Examples

 ADDPFM   FILE(INVENTX)  MBR(MONDAYTX)
         TEXT('Monday''s Inventory Transactions')

This command adds a member named MONDAYTX to the physical file named INVENTX. The library list (*LIBL) is used to find the file because the FILE value is not qualified by a library name. The size of the member and the storage allocation values assigned to this member were specified in the CRTPF command that created the physical file. The text, Monday's Inventory Transactions, describes this member of the INVENTX file.

Top


 

Error messages

*ESCAPE Messages

CPF3204

Cannot find object needed for file &1 in &2.

CPF7306

Member &1 not added to file &2 in &3.

Top