CHKPTCLEAN System Option

When SAS is in checkpoint mode or restart mode, specifies whether to erase the contents of the Work library after a batch program executes successfully.
Valid in: Configuration file, SAS invocation
Category: Environment control: Error handling
PROC OPTIONS GROUP= ERRORHANDLING
Note: This option can be restricted by a site administrator. For more information, see Restricted Options.

Syntax

CHKPTCLEAN | NOCHKPTCLEAN

Syntax Description

CHKPTCLEAN
specifies that the files in the Work library are to be erased after a batch program successfully executes in checkpoint mode or restart mode.
NOCHKPTCLEAN
specifies that the files in the Work library are not to be erased after a batch program successfully executes in checkpoint mode or restart mode. This is the default.

Details

Typically, checkpoint mode or restart mode is started with the NOWORKTERM and NOWORKINIT system options set. When these option are set, the Work library is preserved between SAS sessions. You can use the CHKPTCLEAN system option to erase all files from the Work library if you no longer need the files after your batch program successfully runs in checkpoint mode or restart mode.
This option is effective only when the following conditions are met:
  • SAS is in either checkpoint mode or restart mode. SAS enters checkpoint mode when the STEPCHKPT option or the LABELCHKPT option is set. SAS enters restart mode when the STEPRESTART option or the LABELRESTART option is set.
  • The checkpoint library is Work.
  • The program runs successfully in batch mode.
If the program does not run successfully, the files in the Work library are not erased, regardless of whether the CHKPTCLEAN option is set.

Comparisons

The CHKPTCLEAN option erases the contents of the Work library after the successful completion of a batch program only in checkpoint mode or restart mode.
The WORKTERM option erases the contents of the Work library when a SAS session ends.