Command reference / db

CHGPF

Change Physical File

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 defaulted for the add operation. To change the attributes of a specific member, use CHGPFM. If format attributes change, the existing data is converted based on field names, and data in a field whose name changed is lost. Changes to data or access path attributes can take a long time, and status messages are sent to the interactive user during the operation.

Allowed environments: *ALL. Positional parameters: 1.

Restrictions

Parameters

FILE Physical file

Specifies the physical file to be changed. If a DDM file is specified, it identifies the name of the physical file and the remote system to change. This is a required parameter.

Type
*QUAL
Required
Yes
Case
Uppercase
*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 none is specified for the job, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Physical file Physical file

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

SYSTEM System

Specifies whether the physical file is changed on the local system or on a remote system using distributed data management (DDM).

Type
*CHAR
Required
No
Default
*LCL
Length
9
Case
Uppercase

Allowed values: *LCL, *RMT, *FILETYPE

*LCL
The physical file is changed on the local system.
*RMT
The physical file is changed on a remote system using DDM; FILE must name the DDM file.
*FILETYPE
If FILE names a DDM file, the file is changed on the remote system named in it; otherwise the local file is changed.

SRCFILE Source file

Specifies the source file containing the DDS that describes the record format, fields and access path used to change the physical file.

Type
*QUAL
Required
No
Default
*NONE
Case
Uppercase

Suggested / special values: *NONE

*NONE
No source file is specified; neither format nor access path attributes are changed.
*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 searched; if none is specified, QGPL is searched.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Source file Source file

Type
*NAME
Required
No
Default
QDDSSRC
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

SRCMBR Source member

Specifies the source file member that contains the DDS for the physical file. Valid only when a source file is specified.

Type
*NAME
Required
No
Default
*FILE
Length
10
Case
Uppercase

Suggested / special values: *FILE

*FILE
The source member name is the same as the name of the physical file being changed.

OPTION Source listing options

Type
*CHAR
Required
No
Length
9
List limit
3
Case
Uppercase

Allowed values: *SRC, *NOSRC, *SOURCE, *NOSOURCE, *LIST, *NOLIST, *SECLVL, *NOSECLVL, *EVENTF, *NOEVENTF

GENLVL Generation severity level

Type
*UINT2
Required
No
Default
20
Range
0 to 30
Case
Uppercase

FLAG Flagging severity level

Type
*UINT2
Required
No
Default
0
Range
0 to 30
Case
Uppercase

DLTDEPLF Delete dependent logical file

Specifies whether logical files and SQL materialized query tables dependent on a field that the change removes from the file are deleted.

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

Allowed values: *NO, *YES

*NO
The dependent files are not deleted; the field is not removed and the file is not changed, and the command ends.
*YES
The files dependent on a removed field are deleted.

RMVCST Remove constraint

Specifies whether constraint relationships in the dependent files are removed when deleting a parent file of a referential constraint. Valid only when DLTDEPLF(*YES).

Type
*CHAR
Required
No
Default
*RESTRICT
Length
9
Case
Uppercase

Allowed values: *RESTRICT, *REMOVE

*RESTRICT
The constraint relationships are not removed; the parent file is not removed and the file is not changed, and the command ends.
*REMOVE
Constraints dependent on a removed field are removed; removing a unique constraint also removes dependent referential constraints.

EXPDATE Expiration date for member

Specifies the expiration date for all members of the file; members should not be used after this date. Must be in job date format and not earlier than the current date.

Type
*DATE
Required
No
Default
*SAME
Case
Uppercase

Suggested / special values: *SAME, *NONE

*SAME
The expiration date of the file does not change.
*NONE
No expiration date is specified.

MAXMBRS Maximum members

Specifies the maximum number of members the physical file can have (1 through 32767). It must be greater than or equal to the current number of members.

Type
*INT4
Required
No
Default
*SAME
Case
Uppercase

Suggested / special values: *SAME, *NOMAX

*SAME
The maximum number of members does not change.
*NOMAX
No maximum is specified; the system maximum of 32,767 members is used.

ACCPTHSIZ Access path size

Type
*CHAR
Required
No
Default
*SAME
Length
7
Case
Uppercase

Allowed values: *SAME, *MAX4GB, *MAX1TB

MAINT Access path maintenance

Type
*CHAR
Required
No
Default
*SAME
Length
6
Case
Uppercase

Allowed values: *SAME, *IMMED, *REBLD, *DLY

RECOVER Access path recovery

Type
*CHAR
Required
No
Default
*SAME
Length
7
Case
Uppercase

Allowed values: *SAME, *NO, *AFTIPL, *IPL

FRCACCPTH Force keyed access path

Type
*CHAR
Required
No
Default
*SAME
Length
5
Case
Uppercase

Allowed values: *SAME, *NO, *YES

SIZE Member size

Specifies the initial number of records in each member, the number of records for each increment, and the maximum number of increments. A zero increment prevents automatic extensions.

Type
*ELEM
Required
No
Case
Uppercase
*SAME
The value does not change.
*NOMAX
The number of records that can be added to each member is not limited by the user; the system determines the maximum.
Elements in order

Initial number of records Initial number of records

Type
*UINT4
Required
No
Default
*SAME
Range
1 to 2147483646
Case
Uppercase

Suggested / special values: *SAME

Increment number of records Increment number of records

Type
*UINT2
Required
No
Default
*SAME
Range
0 to 32767
Case
Uppercase

Suggested / special values: *SAME

Maximum increments Maximum increments

Type
*UINT2
Required
No
Default
*SAME
Range
0 to 32767
Case
Uppercase

Suggested / special values: *SAME

ALLOCATE Allocate storage

Specifies whether initial storage space is allocated for each member when it is added, cleared or reorganized. The change takes effect the next time a member is added, or a member is cleared or reorganized.

Type
*CHAR
Required
No
Default
*SAME
Length
5
Case
Uppercase

Allowed values: *SAME, *NO, *YES

*SAME
The allocation method does not change.
*NO
The system determines and allocates the space needed when a member is added, cleared or reorganized.
*YES
The initial member size amount is allocated each time; if not available the member is not added. *NOMAX cannot be used for SIZE with this value.

UNIT Preferred storage unit

Type
*UINT2
Required
No
Default
*SAME
Range
1 to 255
Case
Uppercase

Suggested / special values: *SAME, *ANY, *SSD

FRCRATIO Records to force a write

Type
*INT4
Required
No
Default
*SAME
Case
Uppercase

Suggested / special values: *SAME, *NONE

WAITFILE Maximum file wait time

Type
*INT4
Required
No
Default
*SAME
Case
Uppercase

Suggested / special values: *SAME, *IMMED, *CLS

WAITRCD Maximum record wait time

Type
*INT4
Required
No
Default
*SAME
Case
Uppercase

Suggested / special values: *SAME, *IMMED, *NOMAX

SHARE Share open data path

Specifies whether the open data path (ODP) is shared with other programs in the same routing step.

Type
*CHAR
Required
No
Default
*SAME
Length
5
Case
Uppercase

Allowed values: *SAME, *NO, *YES

*SAME
The ODP sharing value does not change.
*NO
The ODP is not shared; a new ODP is created each 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.

DLTPCT Max % deleted records allowed

Type
*UINT2
Required
No
Default
*SAME
Range
1 to 100
Case
Uppercase

Suggested / special values: *SAME, *NONE

REUSEDLT Reuse deleted records

Type
*CHAR
Required
No
Default
*SAME
Length
5
Case
Uppercase

Allowed values: *SAME, *YES, *NO

SRTSEQ Sort sequence

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Sort sequence Sort sequence

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

LANGID Language ID

Type
*CHAR
Required
No
Default
*SAME
Length
50
Case
Uppercase

Suggested / special values: *SAME, *JOB

LVLCHK Record format level check

Type
*CHAR
Required
No
Default
*SAME
Length
5
Case
Uppercase

Allowed values: *SAME, *YES, *NO

KEEPINMEM Keep in memory

Type
*CHAR
Required
No
Default
*SAME
Length
5
Case
Uppercase

Allowed values: *SAME, *NO, *YES

NODGRP Node group

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Node group Node group

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

PTNKEY Partitioning Key

Type
*NAME
Required
No
Default
*SAME
Length
10
List limit
300
Case
Uppercase

Suggested / special values: *SAME

TEXT Text 'description'

Specifies the text that briefly describes the file, up to 50 characters enclosed in apostrophes.

Type
*CHAR
Required
No
Default
*SAME
Length
50
Case
Mixed case

Suggested / special values: *SAME, *BLANK

*SAME
The text that describes the file does not change.
*BLANK
No text is specified.

CCSID Coded character set ID

Type
*UINT2
Required
No
Default
*SAME
Range
1 to 65535
Case
Uppercase

Suggested / special values: *SAME, *HEX

Examples

CHGPF FILE(QGPL/INV) EXPDATE('10/31/89')

Changes the expiration date for all members in physical file INV to October 31, 1989.

CHGPF FILE(QGPL/T1) SRCFILE(QDDSSRC)

Adds fields, removes fields and changes field attributes based on the DDS in source member T1 of source file QDDSSRC.

IBM command documentation

Generated from os/cl/catalog/CHGPF.json and os/cl/help/CHGPF.json.