Create Physical File (CRTPF)
Where allowed to run: All environments (*ALL)
Threadsafe: ConditionalParameters
Examples
Error messagesThe Create Physical File (CRTPF) command creates a physical file from the information specified on this command and (optionally) from the data description specifications (DDS) contained in a source file.
A physical file is a database file that contains data records. The data records are grouped into physical file members and each member has its own access path to the data. Normally, database files have only one member which, by default, is added to the file when the file is created. If the desired physical file has a record format with only one character field in arrival sequence or if the file is a source file, a DDS source file is not needed. To override attributes of the file after it has been created, use the Override Database File (OVRDBF) command before the file is opened. To change attributes of the file after it has been created, use the Change Physical File (CHGPF) command.
Restrictions:
- This command is conditionally threadsafe. In multithreaded jobs, this command is not threadsafe for distributed files and fails for distributed files that use relational databases of type *SNA.
Top
Parameters
Keyword Description Choices Notes FILE File Qualified object name Required, Positional 1 Qualifier 1: File Name Qualifier 2: Library Name, *CURLIB SRCFILE Source file Qualified object name Optional, Positional 2 Qualifier 1: Source file Name, QDDSSRC Qualifier 2: Library Name, *LIBL, *CURLIB SRCMBR Source member Name, *FILE Optional, Positional 3 RCDLEN Record length, if no DDS Integer Optional, Positional 4 GENLVL Generation severity level 0-30, 20 Optional FLAG Flagging severity level 0-30, 0 Optional FILETYPE File type *DATA, *SRC Optional MBR Member, if desired Name, *FILE, *NONE Optional IGCDTA User specified DBCS data *NO, *YES Optional TEXT Text 'description' Character value, *SRCMBRTXT, *BLANK Optional OPTION Source listing options Values (up to 4 repetitions): *SRC, *NOSRC, *SOURCE, *NOSOURCE, *LIST, *NOLIST, *SECLVL, *NOSECLVL, *EVENTF, *NOEVENTF Optional, Positional 5 SYSTEM System *LCL, *RMT, *FILETYPE Optional EXPDATE Expiration date for member Date, *NONE Optional MAXMBRS Maximum members Integer, 1, *NOMAX Optional ACCPTHSIZ Access path size *MAX1TB, *MAX4GB Optional PAGESIZE Access path logical page size *KEYLEN, 8, 16, 32, 64, 128, 256, 512 Optional MAINT Access path maintenance *IMMED, *DLY, *REBLD Optional RECOVER Access path recovery *NO, *AFTIPL, *IPL Optional FRCACCPTH Force keyed access path *NO, *YES Optional SIZE Member size Single values: *NOMAX
Other values: Element listOptional Element 1: Initial number of records 1-2147483646, 10000 Element 2: Increment number of records Integer, 1000 Element 3: Maximum increments Integer, 3 ALLOCATE Allocate storage *NO, *YES Optional CONTIG Contiguous storage *NO, *YES Optional UNIT Preferred storage unit 1-255, *ANY Optional FRCRATIO Records to force a write Integer, *NONE Optional WAITFILE Maximum file wait time Integer, 30, *IMMED, *CLS Optional WAITRCD Maximum record wait time Integer, 60, *IMMED, *NOMAX Optional SHARE Share open data path *NO, *YES Optional DLTPCT Max % deleted records allowed 1-100, *NONE Optional REUSEDLT Reuse deleted records *YES, *NO Optional SRTSEQ Sort sequence Single values: *SRC, *JOB, *LANGIDSHR, *LANGIDUNQ, *HEX
Other values: Qualified object nameOptional Qualifier 1: Sort sequence Name Qualifier 2: Library Name, *LIBL, *CURLIB LANGID Language ID Character value, *JOB Optional CCSID Coded character set ID Integer, *JOB, *HEX Optional ALWUPD Allow update operation *YES, *NO Optional ALWDLT Allow delete operation *YES, *NO Optional LVLCHK Record format level check *YES, *NO Optional NODGRP Node group Single values: *NONE
Other values: Qualified object nameOptional Qualifier 1: Node group Name Qualifier 2: Library Name, *LIBL, *CURLIB PTNKEY Partitioning Key Values (up to 300 repetitions): Name Optional AUT Authority Name, *LIBCRTAUT, *ALL, *CHANGE, *EXCLUDE, *USE Optional
Top
File (FILE)
Specifies the physical file to be created.
This is a required parameter.
Qualifier 1: File
- name
- Specify the name of the physical file to be created.
Qualifier 2: Library
- *CURLIB
- The current library for the job is where the file is to be located. If no library is specified as the current library for the job, QGPL is used.
- name
- Specify the library where the file is to be located.
Top
Source file (SRCFILE)
Specifies the source file that contains the data description specifications (DDS) that describe the record format and its fields, and the access path for the file and its members. The specifications that are made in DDS are described in the Database information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter and the DDS Reference information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
If a value is specified for this parameter, a value cannot be specified for the Record length (RCDLEN) parameter.
Qualifier 1: Source file
- QDDSSRC
- The DDS source file named QDDSSRC contains the source descriptions used to create the physical file.
- name
- Specify the name of the source file that contains the DDS used to create the physical file.
Qualifier 2: Library
- *CURLIB
- The current library for the job is where the file is located. If no library is specified as the current library for the job, QGPL is used.
- name
- Specify the library where the file is located.
Top
Source member (SRCMBR)
Specifies the name of the source file member that contains the DDS for the physical file being created; the member is in the source file specified in the SRCFILE parameter (or its default, QDDSSRC). If SRCMBR is specified, RCDLEN cannot be specified.
- *FILE
- The source file member name is the same as that of the physical file specified for the File (FILE) parameter.
- name
- Specify the name of the member in the source file.
Top
Record length (RCDLEN)
Specifies the length (in bytes) of the records stored in the physical file. If RCDLEN and FILETYPE(*DATA) are specified, the physical file is created with a record format that has only one field. The file is then restricted to an arrival sequence access path. The record format and the field are both assigned the same name as that of the file, specified in the FILE parameter. A value ranging from 1 through 32766 bytes can be specified for the record length.
If RCDLEN and FILETYPE(*SRC) are specified, the record format has three fields: source sequence number, date, and source statement. The RCDLEN parameter must provide six positions for the source sequence number, six positions for the date field, and one position for source start, which are required in each record. These fields are defined with fixed attributes and names. If records are copied into the file by the CPYF command and the records are longer than the length specified, the records are truncated on the right.
If RCDLEN is specified, SRCFILE and SRCMBR cannot be specified; RCDLEN is used to specify a fixed record length for the record format when a source file is not needed (when only one field exists in each record or when the file being created is a source file). The high-level language program that processes the file must describe the fields in the record in the program.
Double-Byte Character Set Considerations
If IGCDTA(*NO) is specified, the field is assigned the data type of character whose length is the same as the record length specified. A value ranging from 1 to 32766 bytes can be specified for the record length. If IGCDTA(*YES) is specified, the field is assigned the data type of DBCS-open and a value ranging from 4 to 32766 can be specified.
The RCDLEN parameter must provide six positions for the source sequence number, six positions for the date field, and four positions for source start when FILETYPE(*SRC) and IGCDTA(*YES) are specified.
- integer
- Specify the number of bytes in each record.
Top
Generation severity level (GENLVL)
Specifies the severity level at which the create operation fails. If errors occur that have a severity level greater than or equal to this value, the operation ends.
This parameter applies only to messages created while processing DDS source files.
- 20
- If errors occur in the DDS source file processing with a severity level greater than or equal to 20, the file is not created.
- 0-30
- Specify the desired severity level value. If 0 is specified, the file is not created. The value specified must be greater than or equal to the value specified for the Flagging severity level (FLAG) parameter.
Top
Flagging severity level (FLAG)
Specifies the minimum severity level of messages to be listed.
- 0
- All messages are listed.
- 0-30
- Specify a number indicating the minimum severity of messages to be listed. The value specified must be greater than or equal to the value specified for the Generation severity level (GENLVL) parameter.
Top
File type (FILETYPE)
Specifies whether each member of the physical file being created contains data records or contains source records (statements) for a program or another file. The file can contain, for example, RPG source statements for an RPG program or DDS source statements for another physical, logical, or device file.
- *DATA
- The physical file will contain data records.
- *SRC
- The physical file will contain source records.
Top
Member (MBR)
Specifies the name of the physical file member added when the physical file is created.
- *FILE
- The name of the member will be the same as the physical file to be created.
- *NONE
- No physical file member is added when the file is created.
- name
- Specify the name of the physical file member to be added to the new file.
Top
User specified DBCS data (IGCDTA)
Specifies, for program-described files, whether the file processes double-byte character set (DBCS) data. Specifies, for externally described files, the DBCS attributes of the file.
This parameter has no meaning for physical files created using DDS, because the use of DBCS data is specified in the DDS.
- *NO
- The file does not contain double-byte character set (DBCS) data.
- *YES
- The file contains DBCS data.
Double-Byte Character Set Considerations
If the user creates a physical file and specifies the RCDLEN parameter, the system creates a default record format.
- If IGCDTA(*YES) is specified, the default record format can contain DBCS data (as if the record were specified with the DBCS-open (O in column 35 of DDS specification) data type).
- If IGCDTA(*NO) is specified, the default record format cannot contain DBCS data (as if the record were specified with the character (A or blank in column 35 of DDS specification) data type).
The system ignores the IGCDTA parameter value if a value for the RCDLEN parameter is not specified.
The user cannot override the IGCDTA value for a physical file.
Top
Text 'description' (TEXT)
Specifies the text that briefly describes the object.
- *SRCMBRTXT
- The text is taken from the source file member being used to create the physical file. If the source file is a database file, the text is taken from the source file member. Text can be added or changed for a database source member by using the Source Entry Utility or by using either the Add Physical File Member (ADDPFM) command or the Change Physical File Member (CHGPFM) command. If the source file is an inline file or a device file, the text is blank.
- *BLANK
- No text is specified.
- character-value
- Specify no more than 50 characters of text, enclosed in apostrophes.
Top
Source listing options (OPTION)
Specifies the type of output produced when the file is created. A maximum of four of the following values can be specified in any order on this parameter. If neither or both of the values on an option are specified, the first value is used.
The first values on each option are similar to, but are not actually default values, and therefore, cannot be changed with the CHGCMDDFT (Change Command Default) command.
Source Listing Option
- *SRC or *SOURCE
- A printout of the source statements, including a list of errors, is created.
- *NOSRC or *NOSOURCE
- No printout of the source statements is created unless errors are detected. If errors are detected, they are listed along with the keyword or record format that caused the error.
Program Listing Option
- *LIST
- An expanded source printout is created, showing a detailed list of the file specifications and the references to other file descriptions.
- *NOLIST
- The expanded source printout is not created.
Second-Level Message Text Option
- *NOSECLVL
- The messages section of the data description specifications (DDS) printout does not contain the online help information for messages issued during DDS processing.
- *SECLVL
- The online help information appears in the DDS printout.
Event File Creation Option
- *NOEVENTF
- The compiler does not produce an event file for the CoOperative Development Environment for iSeries (CODE for iSeries)
- *EVENTF
- The compiler produces an event file that can be used by the CODE for iSeries product. The event file is created as a member in the file EVFEVENT in your object library. The CODE for iSeries product uses this file to offer error feedback integrated with the CODE for iSeries editor. This value is normally specified by the CODE for iSeries product on your behalf.
Top
System (SYSTEM)
Specifies whether the physical file is created on the local system or the remote system.
- *LCL
- The physical file is created on the local system.
- *RMT
- The physical file is created on a remote system. The file specified for the File (FILE) parameter must be the name of a distributed data management (DDM) file that identifies the remote system and the name of the physical file being created.
- *FILETYPE
- If the file specified for the FILE parameter does not exist on the system, the physical file is created on the local system. Otherwise, the file must be a DDM file, and the physical file is created on a remote system. The DDM file identifies the remote system and the name of the physical file being created.
Top
Expiration date for member (EXPDATE)
Specifies the expiration date for members of the physical file.
- *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
Maximum members (MAXMBRS)
Specifies the maximum number of members that the physical file can contain.
- 1
- Only one member can be contained in the physical file.
- *NOMAX
- The number of members that can be contained in the file is the system maximum of 32,767 members.
- 1-32767
- Specify the maximum number of members that can be contained in the physical file.
Top
Access path size (ACCPTHSIZ)
Specifies the maximum size of auxiliary storage that can be occupied by the following kinds of access paths:
- The access paths that are associated with a physical file that has a keyed sequence access path.
- The access paths that are created for referential or unique constraints, and that can be added to this file with the Add Physical File Constraint (ADDPFCST) command.
This parameter does not apply to access paths that are created for logical files or for queries that refer to the data in a physical file.
- *MAX1TB
- The access paths associated with this file can occupy a maximum of one terabyte (1,099,511,627,776 bytes) of auxiliary storage.
- *MAX4GB
- The access paths associated with this file can occupy a maximum of four gigabytes (4,294,966,272 bytes) of auxiliary storage.
Top
Access path logical page size (PAGESIZE)
Specifies the access path logical page size that is used when the access path is created.
The access path logical page size is used by the system to determine the size of each page of the index. This logical page size is the amount of bytes of the access path that can be moved into the job's storage pool from the auxiliary storage for a page fault.
- *KEYLEN
- The access path logical page size will be determined by the total length of the key, or keys.
- 8
- Logical page size of 8k.
- 16
- Logical page size of 16k.
- 32
- Logical page size of 32k.
- 64
- Logical page size of 64k.
- 128
- Logical page size of 128k.
- 256
- Logical page size of 256k.
- 512
- Logical page size of 512k.
Top
Access path maintenance (MAINT)
Specifies, for files with key fields, the type of access path maintenance used for all members of the physical file.
- *IMMED
- The access path is updated each time a record is changed, added, or deleted from a member. *IMMED must be specified for files that require unique keys.
- *REBLD
- The access path is completely rebuilt each time a file member is opened. The access path is maintained until the member is closed; then the access path is deleted. *REBLD cannot be specified for files that require unique keys.
- *DLY
- The maintenance of the access path is delayed until the physical file member is opened for use. Then, the access path is changed only for records that have been added, deleted, or changed since the file was last opened. While the file is open, changes made to its members are immediately reflected in the access paths of those members, no matter what is specified for MAINT. To prevent a lengthy rebuild time when the file is opened, *DLY should be specified only when the number of changes to the access path between successive opens are small; that is, when the file is opened frequently or when the key fields in records for this access path change infrequently. *DLY is not valid for access paths that require unique key values.
If the number of changes between a close and the next open reaches approximately 10 percent of the access path size, the system stops saving changes and the access path is completely rebuilt the next time the file is opened.
Top
Access path recovery (RECOVER)
Specifies, for files with immediate or delayed access path maintenance, when recovery processing of the file is performed if the access path is being changed when a system failure occurs. This parameter is valid only for a file with a keyed access path.
If *IMMED is specified for the Access path maintenance (MAINT) parameter, the access path can be rebuilt during initial program load (IPL) (before any user can run a job), or after IPL has ended (during jobs running at the same time), or when the file is next opened. While the access path is being rebuilt, the file cannot be used by any job.
During the IPL, an Override Access Path Recovery display lists those access paths that must be recovered and the RECOVER parameter value for each access path. The user can override the RECOVER parameter value on this display. More information on access paths is in the Backup and Recovery book, SC41-5304.
If *REBLD is specified for the MAINT parameter, the access path is rebuilt the next time its file is opened.
- *NO
- The access path of the file is rebuilt when the file is opened. *NO is the default for all files that do not require unique keys. The file's access path, if not valid, is rebuilt when the file is next opened.
*NO is the default for all files that do not require unique keys.
- *AFTIPL
- The access path of the file is rebuilt after the initial program load (IPL) operation is completed. This option allows other jobs not using this file to start processing immediately after the completion of the IPL. If a job tries to allocate the file while its access path is being rebuilt, a file open exception occurs.
*AFTIPL is the default for all files that require unique keys.
- *IPL
- The access path of the file is rebuilt during the IPL operation. This ensures that the file's access path is rebuilt before the first user program tries to use it; however, no jobs can start running until after all files that specify RECOVER(*IPL) have their access paths rebuilt.
Top
Force keyed access path (FRCACCPTH)
Specifies, for files with key fields, whether access path changes are forced to auxiliary storage along with the associated records in the file. FRCACCPTH(*YES) minimizes (but does not remove) the possibility that an abnormal job end may cause damage to the access path that requires it to be rebuilt.
- *NO
- The access path and associated records are not forced to be written to auxiliary storage when the access path is changed.
- *YES
- The access path and associated records are forced to be written to auxiliary storage when the access path is changed. *YES cannot be specified if *REBLD is specified on the Access path maintenance (MAINT) parameter.
FRCACCPTH(*YES) slows the response time of the system if the access path is changed in an interactive job. If the access path is changed frequently, the overall performance of the system is decreased.
Top
Member size (SIZE)
Specifies the initial number of records in each member of the file, the number of records in each part added to the member size, and the number of times the part added is automatically applied. The number of records for each file member is specified as the number of records that can be placed in it (this number includes any deleted records).
When the maximum number of records has been reached, a message (stating that the member is full) is sent to the system operator, giving the choice of ending the request or extending the member size. The operator can extend the member by 10% or by the number of records specified as the increment value, whichever is greater, each time the message is received.
Single values
- *NOMAX
- The number of records that can be added to each member of the file is not limited by the user. The maximum size of each member is determined by the system. If *NOMAX is specified, *NO must be specified for the Allocate storage (ALLOCATE) parameter.
Element 1: Initial number of records
Specify the initial number of records in each member.
- 10000
- Initially, up to 10000 records can be written to each member of the file.
- 1-2147483646
- Specify the number of records that can be written to each member of the file before the member size is automatically extended.
Element 2: Increment number of records
Specify the number of records that are automatically added to the member when the number of records in the member is greater than the initial member size. The minimum size of an increment is 10% of the size of the member at the time the maximum number of records is reached.
- 1000
- The file size is increased by 10% or 1000 records, whichever is greater.
- integer
- Specify the number of additional records which, if greater than 10% of the size of the member when the maximum number of records is reached, are automatically added to the member.
If the number specified is not greater than 10% of the member size and not equal to zero, the member size is increased by 10%.
If 0 is the specified increment value, the member is not automatically extended. This value must be 0 if the value for the number of increments is 0.
Element 3: Maximum increments
Specify the maximum number of increments that can be automatically added to the member.
- 3
- A maximum of 3 increments is automatically added to the member size.
- integer
- Specify the maximum number of increments automatically added to the member size. Valid values range from 0 through 32767. If 0 is specified, the member is not automatically extended.
Top
Allocate storage (ALLOCATE)
Specifies whether initial storage space is allocated to each physical file member added to the file. The allocation provides enough space to hold the number of records specified for the Member size (SIZE) parameter. Allocations that occur when a record cannot be added to a member without exceeding its capacity are determined by the system and by the SIZE parameter values.
- *NO
- The system determines the amount of storage space to allocate to each member added to the file.
- *YES
- The amount of storage space specified in the first value of the SIZE parameter is allocated each time a new member is added. If *YES is specified, *NOMAX must not be specified for the SIZE parameter.
Top
Contiguous storage (CONTIG)
Specifies, for each physical file member added to the file, whether all of the records in the initial storage allocation must be stored next to each other.
- *NO
- Storage of the records next to each other is not required.
- *YES
- The space containing the records allows the records to be stored next to each other. If the records must be separated, the member is added and a message is sent to the user indicating that storage of the records next to each other is not available.
Top
Preferred storage unit (UNIT)
This parameter is no longer supported. It exists solely for compatibility with releases earlier than Version 3 Release 6 Modification 0 of the OS/400 operating system. For information on using auxiliary storage pools (ASPs), refer to the Backup and Recovery book, SC41-5304.
You can specify the value *ANY or a value ranging from 1 through 255 on this parameter.
Top
Records to force a write (FRCRATIO)
Specifies the number of inserted or updated records that are processed before the records are forced into auxiliary storage. If this physical file is being journaled, either a large number or *NONE should be used. *NONE may cause long synchronization of the journal and physical files.
- *NONE
- There is no specified force ratio. The system determines when the records are written to auxiliary storage.
- integer
- Specify the number of inserted or updated records that are processed before the records are written to auxiliary storage.
Top
Maximum file wait time (WAITFILE)
Specifies the number of seconds that the program waits for the file resources to be allocated when the file is opened, or the device or session resources to be allocated when an acquire operation is performed to the file. If the file resources cannot be allocated in the specified wait time, an error message is sent to the program.
- *IMMED
- The program does not wait. Immediate allocation of file resources is required.
- *CLS
- The job default wait time is used as the wait time for the file resources to be allocated.
- 1-32767
- Specify the number of seconds to wait for file resources to be allocated.
Top
Maximum record wait time (WAITRCD)
Specifies the number of seconds that the program waits for a record being changed or deleted. If the record cannot be allocated within the specified wait time, an error message is sent to the program.
- 60
- The program waits for 60 seconds for a record being changed or deleted.
- *IMMED
- The program does not wait; when a record is locked, an immediate allocation of the record is required.
- *NOMAX
- The wait time is the maximum allowed by the system (32,767 seconds).
- 1-32767
- Specify the number of seconds that the program waits for a record being changed or deleted.
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.
This parameter cannot be specified when *NONE is specified for the Member (MBR) parameter.
- *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.
- A new ODP for the file is created and used every time a program opens the file with *NO specified for this parameter.
- *YES
- The same ODP is shared with each program in the job that also specifies *YES when it opens the file.
Top
Max % deleted records allowed (DLTPCT)
Specifies the maximum allowed percentage of deleted records for each member in the physical file. The percentage check is made when the member is closed. If the percentage of deleted records is greater than the value specified on this parameter, a message is sent to the system history log (QHST) to inform the user.
- *NONE
- The percentage of deleted records in the file members is not checked.
- 1-100
- Specify the largest allowed percentage of deleted records for any member in the file.
Top
Reuse deleted records (REUSEDLT)
Specifies whether the space used by deleted data entries should be reclaimed by future insert requests.
Notes:
- If *YES is specified on this parameter, the key ordering attribute for the physical file in the Data Description Specifications (DDS) source cannot be "FIFO" or "LIFO".
- If a *YES value is specified for this parameter, the arrival order becomes meaningless for a file that reuses deleted record space. Records might not be added at the end of the file.
- *NO
- The file does not reclaim space used by deleted data entries.
- *YES
- The file reclaims space used by deleted data entries.
Top
Sort sequence (SRTSEQ)
Specifies the sort sequence used for this file. The sort sequence is used with the LANGID and CCSID parameters to determine which sort sequence table is used.
Single values
- *SRC
- The table specified in the data description specification (DDS) on the ALTSEQ keyword is used. If ALTSEQ is not used in the DDS, use the value specified for *JOB on this parameter.
- *JOB
- The sort sequence value used is the value for the job issuing this command to create the physical file.
- *LANGIDSHR
- The sort sequence table can contain the same weight for multiple characters, and is the shared weighted table associated with the language specified in the LANGID parameter.
- *LANGIDUNQ
- The sort sequence table must contain a unique weight for each character in the code page.
- *HEX
- A sort sequence table is not used, and the hexadecimal values of the characters are used to determine the sort sequence.
Qualifier 1: Sort sequence
- name
- Specify the name of the sort sequence table.
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 searched. 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
Language ID (LANGID)
Specifies the language identifier used when *LANGIDSHR or *LANGIDUNQ is specified on the SRTSEQ parameter. The language identifier is used with the SRTSEQ and CCSID parameters to determine which sort sequence table the file will use.
- *JOB
- The language identifier specified for the job is used.
- character-value
- Specify a language identifier. To see a complete list of identifiers when prompting this command, position the cursor on the field for this parameter and press F4 (Prompt).
Top
Coded character set ID (CCSID)
Specifies the coded character set identifier (CCSID) being used to describe character data in the fields of the file.
This parameter is applicable only if no value is specified for the Source file (SRCFILE) parameter and if a value is specified for the Record length (RCDLEN) parameter. If you specify a value other than the default value (*JOB) on this parameter, the SRCFILE parameter is not used, and a value must be specified for the RCDLEN parameter.
A file created with no DDS when FILETYPE(*DATA) is specified has a CCSID of 65535, regardless of the job CCSID value.
- *JOB
- The current job's default CCSID is used.
- *HEX
- The CCSID 65535 is used, which indicates that character data in the fields is treated as bit data and is not converted.
- integer
- Specify the CCSID to be used. More information about CCSIDs is in the Globalization topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Top
Allow update operation (ALWUPD)
Specifies whether records in this physical file can be updated.
- *YES
- Records in this physical file can be updated.
- *NO
- Records in this physical file, or in any logical file that accesses the records in this physical file, cannot be updated.
Top
Allow delete operation (ALWDLT)
Specifies whether records in this physical file can be deleted. Records in a logical file can be deleted only when the records in each physical file on which the logical file is based can be deleted.
- *YES
- Records in this physical file can be deleted.
- *NO
- Records in this physical file, or in any logical file that accesses the records in this physical file, cannot be deleted.
Top
Record format level check (LVLCHK)
Specifies whether the level identifiers of the record formats in the physical file are checked when the file is opened by a program.
- *YES
- The level identifiers of the record formats are checked. If the level identifiers do not all match, an open error message is sent to the program requesting the open operation.
- *NO
- The level identifiers are not checked when the file is opened.
Top
Node group (NODGRP)
Specifies a node group across which the file is to be distributed.
Single values
- *NONE
- The file is not a distributed file. All data associated with the file is on the local system.
Qualifier 1: Node group
- name
- Specify the name of a node group associated with this 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 searched. If no library is specified as the current library for the thread, the QGPL library is searched.
- name
- Specify the name of the library to be searched.
Top
Partitioning Key (PTNKEY)
Specifies the field, or set of fields, that is used as the partition key for distributing data. Up to 300 field names can be specified.
This parameter is not valid if *NONE is specified for the Node group (NODGRP) parameter. If a node group name is specified for the NODGRP parameter, one or more field names must be specified.
- name
- Specify the name of a field to be included in the partition key.
Top
Authority (AUT)
Specifies the authority you are giving to users who do not have specific authority for the object, who are not on an authorization list, and whose group profile or supplemental group profiles do not have specific authority for the object.
- *LIBCRTAUT
- The system determines the authority for the object by using the value specified for the Create authority (CRTAUT) parameter on the Create Library command (CRTLIB) for the library containing the object to be created. If the value specified for the CRTAUT parameter is changed, the new value will not affect any existing objects.
- *CHANGE
- The user can perform all operations on the object except those limited to the owner or controlled by object existence (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the object. *CHANGE authority provides object operational (*OBJOPR) authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.
- *ALL
- The user can perform all operations except those limited to the owner or controlled by authorization list management (*AUTLMGT) authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the object.
- *USE
- The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. Use (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
- *EXCLUDE
- The user cannot access the object.
- name
- Specify the name of an authorization list to be used for authority to the object. Users included in the authorization list are granted authority to the object as specified in the list. The authorization list must exist when the object is created.
Top
Examples
Example 1: Creating a Physical File
CRTPF FILE(PAYLIB/PAYTXS) SRCFILE(SRCLIB/PAYTXS) MBR(*NONE) MAXMBRS(5)This command creates a physical file named PAYTXS in the PAYLIB library. The source descriptions in the member PAYTXS in source file PAYTXS in the SRCLIB library are used to create the physical file. The file is created without members (*NONE was specified); therefore, no data can be put into the file until a member is added later. As many as five members can be contained in the file.
By default, each file member added later will contain data records. The access path of each member is continuously maintained. Each member can have up to 10,000 records before automatic extensions (three increments maximum) occur that add 1000 records to the capacity of the member. Storage space for each member is allocated only as needed, with no restrictions on whether the space is contiguous; there is no initial storage allocation. The public has object operational, read, add, delete, and update authority for the file.
Example 2: Creating a Physical File and Member
CRTPF FILE(ORDERCTL/ORDERS) SRCFILE(ORDERCTL/ORDERSRC) SRCMBR(MFGORD) MAXMBRS(50) SIZE(1000 100 5) ALLOCATE(*YES)This command creates a physical file and physical file member, both named ORDERS in the ORDERCTL library. The file and its member are created from the MFGORD source member of the ORDERSRC source file in the same library. Storage space for the records placed in the file need not be contiguous. Up to 50 members can be contained in the file. The initial allocation of storage provides for up to 1000 records, and up to five increments of additional space for 100 records each can be added automatically. These allocation values also apply to each member of this physical file that is added later.
Top
Error messages
*ESCAPE Messages
- CPF3204
- Cannot find object needed for file &1 in &2.
- CPF323C
- QRECOVERY library could not be allocated.
- CPF5702
- File either not DDM file or not found.
- CPF7302
- File &1 not created in library &2.
Top