CL Command Reference - CRTSRCPF

CL Command List > CRTSRCPF Reference

Description:

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:

. This command is conditionally threadsafe. In multithreaded jobs, this command is not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA, when SYSTEM(*RMT) or SYSTEM(*FILETYPE) is specified.


Examples:

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.