Clear Save File (CLRSAVF)

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

The Clear Save File (CLRSAVF) command clears the contents of a save file. This command clears all existing records from the save file and reduces the amount of storage used by this file.

A save file must be cleared before it can be used again to receive data from a save command or to receive another save file. If the user attempts to write new save data into a save file that already contains records, an inquiry message is sent to the work station for an interactive job, or to the system operator for a batch job, unless a save command is used and CLEAR(*ALL) is specified.

Note: This command ignores all file overrides that are currently in effect for the job.

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, *LIBL, *CURLIB
Top

Save file (FILE)

Specifies the save file to be cleared.

This is a required parameter.

Qualifier 1: Save file

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

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 used to locate the save file. If no current library entry exists in the library list, the QGPL library is used.
name
Specify the name of the library where the save file is located.
Top

Examples

CLRSAVF   FILE(ONLINE)

This command clears the contents of save file ONLINE. Any existing records in the file are removed, and the file size is reduced to the minimum size possible.

Top

Error messages

*ESCAPE Messages

CPF3782
File &1 in &2 not a save file.
CPF3812
Save file &1 in &2 in use.
CPF9807
One or more libraries in library list deleted.
CPF9808
Cannot allocate one or more libraries on library list.
CPF9810
Library &1 not found.
CPF9812
File &1 in library &2 not found.
CPF9820
Not authorized to use library &1.
CPF9822
Not authorized to file &1 in library &2.
CPF9830
Cannot assign library &1.
Top