Command reference / db

CRTPF

Create Physical File

Creates a physical file from the parameters on this command and, optionally, from the DDS in a source file. Data records are grouped into members, and each member has its own access path. A DDS source file is not needed when the record format has only one character field in arrival sequence, or when the file is a source file. Use OVRDBF to override attributes before open, and CHGPF to change them afterward.

Allowed environments: *ALL. Positional parameters: 5.

Restrictions

Parameters

FILE File

Names the physical file to create. This parameter is required.

Type
*QUAL
Required
Yes
Case
Uppercase
*CURLIB
The job's current library, or QGPL if none is set.
Qualified parts (object, then library; write LIBRARY/OBJECT)

File File

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

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

Suggested / special values: *CURLIB

SRCFILE Source file

Names the source file holding the DDS that describes the record format, fields and access paths. Cannot be combined with RCDLEN.

Type
*QUAL
Required
No
Case
Uppercase
*LIBL
Search the library list for the source file's library.
*CURLIB
Use the job's current library, or QGPL if none is set.
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

Names the source member that holds the DDS. Cannot be specified with RCDLEN.

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

Suggested / special values: *FILE

*FILE
Use the same name as the physical file.

RCDLEN Record length, if no DDS

Sets the record length in bytes. With FILETYPE(*DATA) it creates a single-field record format. Allowed range is 1 through 32766.

Type
*INT4
Required
No
Case
Uppercase

GENLVL Generation severity level

Severity at or above which DDS processing errors cause the create to fail. Must be greater than or equal to FLAG.

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

FLAG Flagging severity level

Minimum severity of DDS messages to list. Must be less than or equal to GENLVL.

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

FILETYPE File type

Whether each member holds data records or source statements.

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

Allowed values: *DATA, *SRC

*DATA
Members contain data records.
*SRC
Members contain source statements.

MBR Member, if desired

Names the member added when the file is created.

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

Suggested / special values: *FILE, *NONE

*FILE
The member has the same name as the file.
*NONE
No member is added.

IGCDTA User specified DBCS data

For program-described files, whether the file processes DBCS data. For DDS-described files, DBCS attributes come from the DDS.

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

Allowed values: *NO, *YES

*NO
The file does not contain DBCS data.
*YES
The file contains DBCS data.

TEXT Text 'description'

Describes the object in up to 50 characters.

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

Suggested / special values: *SRCMBRTXT, *BLANK

*SRCMBRTXT
Take the text from the source member.
*BLANK
No text.

OPTION Source listing options

Controls the output produced when the file is created. Up to four values can be given.

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

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

*SRC
Print source statements and any errors.
*SOURCE
Same as *SRC.
*NOSRC
Print source only when errors are found.
*NOSOURCE
Same as *NOSRC.
*LIST
Print an expanded source listing.
*NOLIST
No expanded listing.
*SECLVL
Include second-level message help in the DDS printout.
*NOSECLVL
Omit second-level message help.
*EVENTF
Create an event file for CODE tooling.
*NOEVENTF
No event file.

SYSTEM System

Whether the physical file is created on the local or a remote system.

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

Allowed values: *LCL, *RMT, *FILETYPE

*LCL
Create on the local system.
*RMT
Create on a remote system; FILE must name a DDM file.
*FILETYPE
Local if FILE does not exist, otherwise FILE must be a DDM file.

EXPDATE Expiration date for member

Date after which the member cannot be used.

Type
*DATE
Required
No
Default
*NONE
Case
Uppercase

Suggested / special values: *NONE

*NONE
No expiration date.

MAXMBRS Maximum members

Maximum number of members the physical file can contain.

Type
*INT4
Required
No
Default
1
Case
Uppercase

Suggested / special values: *NOMAX

*NOMAX
The system maximum of 32,767 members.

ACCPTHSIZ Access path size

Maximum auxiliary storage that keyed-sequence and constraint access paths for this file can occupy.

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

Allowed values: *MAX1TB, *MAX4GB

*MAX1TB
Up to 16 terabytes.
*MAX4GB
Up to 4 gigabytes.

PAGESIZE Access path logical page size

Logical page size used when the access path is created. It determines the size of each index page moved between disk and memory.

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

Allowed values: *KEYLEN

*KEYLEN
Size chosen from the total key length; minimum 32K.

MAINT Access path maintenance

For files with key fields, how the access path is maintained for all members.

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

Allowed values: *IMMED, *DLY, *REBLD

*IMMED
Updated on each add, change or delete; required for unique keys.
*DLY
Maintenance delayed until the member is opened; not valid for unique keys.
*REBLD
Rebuilt on each open and deleted on close; not valid for unique keys.

RECOVER Access path recovery

When recovery runs if the access path is being changed at a system failure. Valid only for a keyed access path.

Type
*CHAR
Required
No
Length
7
Case
Uppercase

Allowed values: *NO, *AFTIPL, *IPL

*NO
Rebuilt when the file is opened; default for files without unique keys.
*AFTIPL
Rebuilt after IPL completes; default for files with unique keys.
*IPL
Rebuilt during IPL, before user jobs start.

FRCACCPTH Force keyed access path

Whether access path changes are forced to auxiliary storage together with the records.

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

Allowed values: *NO, *YES

*NO
Not forced.
*YES
Forced; cannot be combined with MAINT(*REBLD).

SIZE Member size

Initial number of records per member, number of records per increment, and maximum number of increments.

Type
*ELEM
Required
No
Case
Uppercase
*NOMAX
No user limit on records; requires ALLOCATE(*NO).
Elements in order

Initial number of records Initial number of records

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

Increment number of records Increment number of records

Type
*INT4
Required
No
Default
1000
Case
Uppercase

Maximum increments Maximum increments

Type
*INT4
Required
No
Default
3
Case
Uppercase

ALLOCATE Allocate storage

Whether initial storage is allocated to each member added to the file.

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

Allowed values: *NO, *YES

*NO
The system decides the allocation.
*YES
Allocate the initial SIZE amount for each new member.

CONTIG Contiguous storage

Whether the records in the initial allocation must be stored next to each other.

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

Allowed values: *NO, *YES

*NO
Contiguous storage not required.
*YES
Required; if not possible, the member is added and a message is sent.

UNIT Preferred storage unit

Preferred storage media for the file.

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

Suggested / special values: *ANY, *SSD

*ANY
Any available storage media.
*SSD
Solid state disk preferred.

FRCRATIO Records to force a write

Number of inserted or updated records processed before they are forced to auxiliary storage. Use a large number or *NONE for journaled files.

Type
*INT4
Required
No
Default
*NONE
Case
Uppercase

Suggested / special values: *NONE

*NONE
No force ratio; the system decides.

WAITFILE Maximum file wait time

Seconds the program waits for file resources at open, or for device or session resources at acquire.

Type
*INT4
Required
No
Default
30
Case
Uppercase

Suggested / special values: *IMMED, *CLS

*IMMED
Do not wait.
*CLS
Use the job default wait time.

WAITRCD Maximum record wait time

Seconds the program waits for a record being changed or deleted.

Type
*INT4
Required
No
Default
60
Case
Uppercase

Suggested / special values: *IMMED, *NOMAX

*IMMED
Do not wait.
*NOMAX
The system maximum of 32,767 seconds.

SHARE Share open data path

Whether the open data path is shared with other programs in the same routing step.

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

Allowed values: *NO, *YES

*NO
Not shared; a new ODP is created on each open.
*YES
Shared with each program in the job that also specifies *YES.

DLTPCT Max % deleted records allowed

Largest allowed percentage of deleted records per member. A message goes to QHST if exceeded.

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

Suggested / special values: *NONE

*NONE
Not checked.

REUSEDLT Reuse deleted records

Whether space from deleted records is reclaimed by later inserts.

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

Allowed values: *NO, *YES

*YES
Reclaim deleted record space.
*NO
Do not reclaim it.

SRTSEQ Sort sequence

Sort sequence for the file. Used with LANGID and CCSID to choose the sort table.

Type
*QUAL
Required
No
Case
Uppercase
*SRC
Use the ALTSEQ table from the DDS, else the *JOB value.
*JOB
Use the job's sort sequence.
*LANGIDSHR
Shared weighted table for the LANGID language.
*LANGIDUNQ
Table with a unique weight for each character.
*HEX
No table; hexadecimal values determine sequence.
*LIBL
Search the library list for the table.
*CURLIB
Search the job's current library.
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

Language identifier used with *LANGIDSHR or *LANGIDUNQ.

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

Suggested / special values: *JOB

*JOB
The job's language identifier.

CCSID Coded character set ID

CCSID describing the character data in the file's fields. Applies only when SRCFILE is not specified and RCDLEN is.

Type
*INT4
Required
No
Default
*JOB
Case
Uppercase

Suggested / special values: *JOB, *HEX

*JOB
The job's default CCSID.
*HEX
CCSID 65535, treated as bit data and not converted.

ALWUPD Allow update operation

Whether records in this file can be updated.

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

Allowed values: *YES, *NO

*YES
Records can be updated.
*NO
No updates, directly or through any logical file.

ALWDLT Allow delete operation

Whether records in this file can be deleted.

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

Allowed values: *YES, *NO

*YES
Records can be deleted.
*NO
No deletes, directly or through any logical file.

LVLCHK Record format level check

Whether record format level identifiers are checked when a program opens the file.

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

Allowed values: *YES, *NO

*YES
Checked; a mismatch sends an open error message.
*NO
Not checked.

NODGRP Node group

Node group across which the file is distributed.

Type
*QUAL
Required
No
Case
Uppercase
*NONE
Not distributed; all data is local.
*LIBL
Search the library list for the node group.
*CURLIB
Search the thread's current library.
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

Field or fields used as the partition key for distributing data; up to 300. Not valid when NODGRP(*NONE).

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

AUT Authority

Authority given to users with no specific authority, who are not on an authorization list, and whose group profiles have no specific authority.

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

Suggested / special values: *LIBCRTAUT, *ALL, *CHANGE, *EXCLUDE, *USE

*LIBCRTAUT
Take the CRTAUT value of the library.
*ALL
All operations except authorization list management.
*CHANGE
All data authority and most operations, except owner-limited ones.
*USE
Basic operations such as reading; cannot change the object.
*EXCLUDE
No access.

Examples

CRTPF FILE(PAYLIB/PAYTXS) SRCFILE(SRCLIB/PAYTXS) MBR(*NONE) MAXMBRS(5)

Creates physical file PAYTXS in PAYLIB from the DDS in member PAYTXS of source file PAYTXS in SRCLIB. No member is added, so none exists until one is added later; up to five members are allowed.

CRTPF FILE(ORDERCTL/ORDERS) SRCFILE(ORDERCTL/ORDERSRC) SRCMBR(MFGORD) MAXMBRS(50) SIZE(1000 100 5) ALLOCATE(*YES)

Creates file and member ORDERS in ORDERCTL from member MFGORD of ORDERSRC. Up to 50 members are allowed, storage is initially allocated for 1000 records, and up to five automatic increments of 100 records each are added.

IBM command documentation

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