Where allowed to run: All environments (*ALL) Threadsafe: Conditional |
Parameters Examples Error messages |
The Create Source Physical File (CRTSRCPF) command creates a source physical file.
A source physical file contains source data needed to create objects such as control language (CL) source statements, which are used to create a CL program, or data description specifications (DDS) which (in turn) are used to create a database or device file.
A source physical file can have one or more members. The maximum number of members that can be added to the file is specified for the Maximum members (MAXMBRS) parameter.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | File | Qualified object name | Required, Positional 1 |
Qualifier 1: File | Name | ||
Qualifier 2: Library | Name, *CURLIB | ||
RCDLEN | Record length | Integer, 92 | Optional, Positional 2 |
MBR | Member, if desired | Name, *NONE, *FILE | Optional, Positional 3 |
IGCDTA | User specified DBCS data | *NO, *YES | Optional |
TEXT | Text 'description' | Character value, *BLANK | Optional |
SYSTEM | System | *LCL, *RMT, *FILETYPE | Optional |
EXPDATE | Expiration date for member | Date, *NONE | Optional |
MAXMBRS | Maximum members | Integer, *NOMAX | Optional |
ACCPTHSIZ | Access path size | *MAX1TB, *MAX4GB | Optional |
PAGESIZE | Access path logical page size | *KEYLEN, 8, 16, 32, 64, 128, 256, 512 | Optional |
ACCPTH | Access path type | *ARRIVAL, *KEYED | 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 list |
Optional |
Element 1: Initial number of records | 1-2147483646, 10000 | ||
Element 2: Increment number of records | Integer, 1000 | ||
Element 3: Maximum increments | Integer, 499 | ||
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, *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 |
CCSID | Coded character set ID | Integer, *JOB, *HEX | Optional |
ALWUPD | Allow update operation | *YES, *NO | Optional |
ALWDLT | Allow delete operation | *YES, *NO | Optional |
AUT | Authority | Name, *LIBCRTAUT, *ALL, *CHANGE, *EXCLUDE, *USE | Optional |
Top |
Specifies the source physical file to be created.
If the file is used in a high-level language program, the file name must be consistent with the naming rules of that language. Otherwise, the file must be renamed in the program.
This is a required parameter.
Qualifier 1: File
Qualifier 2: Library
Top |
Specifies the number of bytes in the length of the records stored in the source physical file. The record format contains three fields: the source sequence number, the date, and the source statement.
This parameter must provide 12 positions for the source sequence number and date fields required in each record. These fields are defined with fixed attributes and names, and they have a keyed access path over the sequence number.
Double-Byte Character Set Considerations
If IGCDTA(*YES) is specified, the RCDLEN parameter must provide six positions for the source sequence number, six positions for the date field, and at least four positions for source start. Valid values for a double-byte character set (DBCS) range from 16 through 32766.
Top |
Specifies the source file member to be added when the file is created.
Top |
Specifies whether the file contains double-byte character set (DBCS) data.
Top |
Specifies the text that briefly describes the object.
Top |
Specifies whether the source physical file is created on the local system or the remote system.
Top |
Specifies, if a source file member is added when the source physical file is created, the expiration date of the source file member.
Top |
Specifies the maximum number of members that the source physical file can contain.
Top |
Specifies the maximum size of auxiliary storage that can be occupied by access paths that are associated with keyed source physical files. This parameter does not apply to access paths that are created for logical files or for queries that refer to the data in a source physical file.
Top |
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.
Top |
Specifies the type of access path used by all the members in the source physical file.
Top |
Specifies the type of access path maintenance used for all members of the source physical file.
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 |
Specifies, for files having immediate or delayed maintenance on their access paths, when recovery processing of the file is performed after a system failure occurs while the access path is being changed. This parameter is valid only for files with a keyed access path.
If *IMMED or *DLY 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), after IPL has ended (during concurrent job running), 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 paths that must be recovered and what the RECOVER parameter value is for each path. The user can override the RECOVER parameter value on this display. More information 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.
Top |
Specifies whether access path changes are forced to auxiliary storage along with the associated records in the source physical file.
Top |
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
Element 1: Initial number of records
Specify the initial number of records in each member.
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.
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.
Top |
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.
Top |
Top |
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 |
Specifies the number of inserted or updated records that are processed before the records are forced into auxiliary storage.
The force write ratio specified for a logical file cannot be less than or equal to the smallest force write ratio of its based-on files. If a larger force write ratio is specified, it is ignored and a message is sent informing the user of the action.
For example, if the force ratios of three physical files are 2, 6, and 8, the logical file force ratio that is based on these three physical files must be as restrictive as the least of them; that is 2 in this case. Two would be used even if the FRCRATIO parameter is not specified. Thus, each time a program inserts, updates, or deletes two records in the logical file (regardless of which based-on physical files are affected), those records are forced to permanent storage.
If a physical file associated with this logical file is being journaled, a large force write ratio or *NONE is specified. More information on journal management is in the Backup and Recovery book, SC41-5304.
Top |
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.
Top |
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.
Top |
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.
Note: This parameter cannot be specified when *NONE is specified for the Member (MBR) parameter.
Top |
Specifies the maximum percentage of deleted records for each member in the source 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 job log.
Top |
Specifies the coded character set identifier (CCSID) used to describe character data in the fields of the source file.
Top |
Specifies whether records in this source physical file can be updated.
Top |
Specifies whether records in this source physical file can be deleted.
Top |
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.
Top |
Example 1: Creating a File Without Members
CRTSRCPF FILE(SRCLIB/PAYTXS)
This command creates a source file named PAYTXS in the SRCLIB library. The file is created without any members; therefore, no data can be put into the file until a member is added later. As many as 32,767 members (*NOMAX) can be added to the file.
Each member can have up to 10000 records before automatic extensions (499 increments maximum) occur that add 1000 records to the capacity of the member. Only minimum initial storage is allocated for each member with no restrictions on whether the space is connected. The public has object operational, read, add, delete, and update authority for the file, but no object management or object existence authority.
Example 2: Creating a File With a Member
CRTSRCPF FILE(ORDERCTL/ORDERS) MBR(*FILE) SIZE(100 50 5)
This command creates a source physical file named ORDERS in the ORDERCTL library. Storage space for the records placed in the file need not be contiguous. The initial allocation of storage provides for up to 100 records, and up to five increments of additional space for 50 records each can be added automatically. These allocation values also apply to members of this source file that will be added later.
Example 3: Creating a File that Contains DBCS Data
CRTSRCPF FILE(IGCLIB/IGCSRC) IGCDTA(*YES)
This command creates a source physical file named IGCSRC, which is stored in the library IGCLIB, and can contain DBCS data.
Top |
*ESCAPE Messages
Top |