Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Change Save File (CHGSAVF) command changes the attributes of the specified save file. The changes become a permanent part of the file and are kept until the file is either changed or deleted.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | Save file | Qualified object name | Required, Key, Positional 1 |
Qualifier 1: Save file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
MAXRCDS | Maximum records | 1-2146762800, *SAME, *NOMAX | Optional |
TEXT | Text 'description' | Character value, *SAME, *BLANK | Optional |
WAITFILE | Maximum file wait time | Integer, *SAME, *IMMED, *CLS | Optional |
SHARE | Share open data path | *SAME, *NO, *YES | Optional |
Top |
Specifies the save file whose attributes are to be changed.
This is a required parameter.
Qualifier 1: Save file
Qualifier 2: Library
Top |
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).
If the current number of records in the save file is greater than the maximum, an error message is sent and the save file does not change.
Note: The maximum amount of data that a save file can contain is approximately 1 terabyte. A message appears when the file is full.
Top |
Specifies the text that briefly describes the object.
Top |
Specifies the number of seconds that the program waits for the file resources to be allocated when the file is opened. If the file resources 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.
Top |
Example 1: File Resources Allocated Immediately
CHGSAVF FILE(ONLINE) WAITFILE(*IMMED)
This command changes the save file named ONLINE so that when it is opened the file resources must be available immediately, or an error message is sent. No other files are changed.
Example 2: Changing Maximum Number of Records
CHGSAVF FILE(ONLINE) MAXRCDS(20000)
This command changes the save file named ONLINE so that it can have up to 20,000 records (approximately 10 megabytes).
Top |
Top |