...more sas code...
run;
report:
proc report data=mylib.mydata;
...more sas code...;
run;
endReadSortReport:
Note: The use of label: in checkpoint mode and restart mode is valid only outside of a
DATA or PROC statement. Checkpoint mode and restart mode for labeled code
sections are not valid for labels within a DATA step or macros.
Checkpoint mode and restart mode can be enabled for either DATA and PROC steps or
for labeled code sections, but not both simultaneously. To use checkpoint mode and
restart mode on a step-by-step basis, use the step checkpoint mode and the step restart
mode. To use checkpoint mode and restart mode based on groups of code sections, use
the label checkpoint mode and the label restart mode. Each group of code is identified by
a unique label. If you use labels, all steps in a SAS program must belong to a labeled
code section.
When checkpoint mode is enabled, SAS records information about DATA and PROC
steps or labeled code sections in a checkpoint library. When a batch program terminates
prematurely, you can resubmit the program in restart mode to complete execution. In
restart mode, global statements are re-executed, macro definitions are recompiled, and
macros are re-executed.. SAS reads the data in the checkpoint library to determine which
steps or labeled code sections completed. Program execution resumes with the step or
the label that was executing when the failure occurred.
The checkpoint-restart data contains information only about the DATA and PROC steps
or the labeled code sections that completed and the step or labeled code sections that did
not complete. The checkpoint-restart data does not contain the following information:
• information about macro variables and macro definitions
• information about SAS data sets
• information that might have been processed in the step or labeled code section that
did not complete
Note: Checkpoint mode is not valid for batch programs that contain the DM statement
to submit commands to SAS. If checkpoint mode is enabled and SAS encounters a
DM statement, checkpoint mode is disabled and the checkpoint catalog entry is
deleted.
As a best practice, if you use labeled code sections, add a label at the end of your
program. When the program completes successfully, the label is recorded in the
checkpoint-restart data. If the program is submitted again in restart mode, SAS knows
that the program has already completed successfully.
If a DATA or PROC step must be re-executed, you can add the global statement
CHECKPOINT EXECUTE_ALWAYS immediately before the step. This statement tells
SAS to always execute the following step without considering the checkpoint-restart
data. It is applicable only to the step that follows the statement. For more information,
see “CHECKPOINT EXECUTE_ALWAYS Statement” in SAS Statements: Reference.
You enable checkpoint mode and restart mode for DATA and PROC steps by using
system options when you start the batch program in SAS.
• STEPCHKPT system option enables checkpoint mode, which indicates to SAS to
record checkpoint-restart data
148 Chapter 8 • Error Processing and Debugging