Create Save File (CRTSAVF)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Create Save File (CRTSAVF) command creates a save file.

A save file can be used with save and restore commands to contain data that would otherwise be written to tape or optical media. A save file can also be used like a database file to read or write records that contain save or restore information. A save file can also be used to send objects to another user on the Systems Network Architecture distribution services (SNADS) network.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
FILE Save file Qualified object name Required, Positional 1
Qualifier 1: Save file Name
Qualifier 2: Library Name, *CURLIB
TEXT Text 'description' Character value, *BLANK Optional
MAXRCDS Maximum records 1-2146762800, *NOMAX Optional
ASP ASP number 1-32, *LIBASP Optional
WAITFILE Maximum file wait time Integer, *IMMED, *CLS Optional
SHARE Share open data path *NO, *YES Optional
AUT Authority Name, *EXCLUDE, *ALL, *CHANGE, *LIBCRTAUT, *USE Optional
Top

Save file (FILE)

Specifies the save 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: Save file

name
Specify the name of the save file to be created.

Qualifier 2: Library

*CURLIB
The current library for the job is used to locate the save file. If no library is specified as the current library for the job, QGPL is used.
name
Specify the library where the save file is located.
Top

Text 'description' (TEXT)

Specifies the text that briefly describes the object.

*BLANK
No text is specified.
character-value
Specify no more than 50 characters of text, enclosed in apostrophes.
Top

Maximum records (MAXRCDS)

Specifies the maximum number of records the save file can contain. The number of bytes of space in the save file is estimated at 8192 + (512 x the number of records in the save file). There is room for approximately two thousand 512-byte records in 1 megabyte of space. If you wanted to ensure that the save file would not exceed approximately 20 megabytes you would specify 40000 records (20 megabytes x 2000 records/megabyte).

Note: The maximum amount of data that a save file can contain is approximately 1 terabyte. A message appears when the file is full.

*NOMAX
The maximum value of 2146762800 records is used.
1-2146762800
Specify the maximum number of records the save file can contain.
Top

Auxiliary storage pool ID (ASP)

Specifies the auxiliary storage pool (ASP) from which the system allocates storage for the save file.

*LIBASP
The storage space for the save file is allocated from the same auxiliary storage pool that the save file's library is allocated from.
1-32
Specify the identifier of the auxiliary storage pool.
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

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.

*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.
*YES
The same ODP is shared with each program in the job that also specifies *YES when it opens the file.
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.

*EXCLUDE
The user cannot access the object.
*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.
*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.
*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.
*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.
name
Specify the name of an authorization list. Users included on the authorization list are granted authority to the object as specified by the list. The authorization list must exist when the object is created.
Top

Examples

CRTSAVF   FILE(ONLINE)  TEXT('Online save file')

This command creates an online save file named ONLINE in the current library. The save file is in the system ASP with no maximum number of records. The public has no authority to this file; only the object owner and users that have the object owner user profile as their group profile can use this save file.

Top

Error messages

*ESCAPE Messages

CPF7302
File &1 not created in library &2.
Top