About Restarting Jobs

The restart from a checkpoint feature provides a means for a failed job to be restarted at the last successful checkpoint taken before the failed step. By default, jobs are designed without implicit checkpoints. Instead, users must explicitly specify checkpoints at the appropriate steps. Checkpoints consist of code that is inserted before a selected transformation’s step.
When a job is rerun after a failure, the last saved checkpoint becomes the restart point for the run. The restart feature enables you to restart a job at the beginning of a step (transformation) when a job previously failed at that step or a subsequent step.
The code for the steps preceding the checkpoint is skipped, and the state is restored from the save-state information preserved by the checkpoint code. Then, processing can pick up from the specified transformation. On a rerun, you can run from either the last saved checkpoint or the beginning of the job. You cannot rerun the job from any other checkpoint.
Note: Only the last successful checkpoint is saved when a job with multiple checkpoints is run. The saved-state information of the last successful checkpoint overwrites the information from earlier checkpoints.
The state can be restored because the following entities are restored to their values from the previous run:
  • macro variable values that are saved at the checkpoint using set sashelp.vmacro(where=(scope ne 'AUTOMATIC')). However, some macro variables are filtered out:
    'CPRID','JOB_RC','TRANS_RC','ETLS_STARTTIME','ETLS_ENDTIME',
    'SQLRC','ETLS_RESETRESTART','ETLS_STEPSTARTTIME','ETLSCPR_PENDINGID',
    'ETLSCPR_RUNNINGID','ETLS_RUNNINGINTERACTIVE','_ARMEXEC','_PERFINIT',
    '_ARMTXID','_PERFNEST','_ARMSHDL','_ARMAPID'
    .
  • library assignments
The following entities are not restored:
  • SAS Global Options. Restoring global options might undo a setting set by an administrator in a configuration file for a rerun. If you add code in a job to set global options, the code should be put in a transformation marked to always run. To set a selected transformation to always run, click Yes in the Run this transformation always when restarting field on the Options tab of the properties window of the transformation.
  • Macros in catalog WORK.SASMACR. Although saving and restoring these macros might be beneficial, there are write-permission problems with restoring macros in this catalog. Therefore, the restart from checkpoint feature will no longer be saving and attempting to restore SASMACR catalog entries. If you have a transformation in a job that declares a macro used in subsequent steps, you must flag the transformation as Run always.
  • Connections to remote machines. If the step that contains the connection code for a job is skipped, the steps that depend on the connection fail.
The restart from a checkpoint feature is covered in the following topics:
Last updated: January 16, 2018