Presentation is loading. Please wait.

Presentation is loading. Please wait.

June 12, 2009 Toronto Area SAS Society 1 What’s new in BASE SAS 9.2 Checkpoint/Restart Rupinder Dhillon Dhillon Consulting Inc.

Similar presentations


Presentation on theme: "June 12, 2009 Toronto Area SAS Society 1 What’s new in BASE SAS 9.2 Checkpoint/Restart Rupinder Dhillon Dhillon Consulting Inc."— Presentation transcript:

1 June 12, 2009 Toronto Area SAS Society 1 What’s new in BASE SAS 9.2 Checkpoint/Restart Rupinder Dhillon Dhillon Consulting Inc.

2 June 12, 2009Toronto Area SAS Society2 What is Checkpoint/Restart? Using Checkpoint and restart modes together allows you to resubmit batch SAS programs that failed. Using Checkpoint and restart modes together allows you to resubmit batch SAS programs that failed. When resubmitted, the program will resume at the DATA or PROC step where the error occurred When resubmitted, the program will resume at the DATA or PROC step where the error occurred DATA and PROC steps that completed successfully in the failed run will not be resubmitted. DATA and PROC steps that completed successfully in the failed run will not be resubmitted.

3 June 12, 2009Toronto Area SAS Society3 Checkpoint/Restart Modes Checkpoint Mode: Checkpoint Mode: SAS records info about the DATA and PROC steps in a Checkpoint library. SAS records info about the DATA and PROC steps in a Checkpoint library. Restart Mode: Restart Mode: SAS reads the checkpoint library to determine which steps completed successfully. The program resumes at the step where the failure occurred. SAS reads the checkpoint library to determine which steps completed successfully. The program resumes at the step where the failure occurred. Note: restart mode will always re-execute GLOBAL statements (ie. FILENAME, LIBNAME) and macros. Note: restart mode will always re-execute GLOBAL statements (ie. FILENAME, LIBNAME) and macros. Why? Because the checkpoint library only stores info about the steps that succeeded and failed. It does not store information about macro variables, macro definitions, SAS datasets or any other info that might have been processed in the step that failed. Why? Because the checkpoint library only stores info about the steps that succeeded and failed. It does not store information about macro variables, macro definitions, SAS datasets or any other info that might have been processed in the step that failed.

4 June 12, 2009Toronto Area SAS Society4 What if a step should ALWAYS be re- run? Add the statement CHECKPOINT EXECUTE_ALWAYS immediately before the step. Add the statement CHECKPOINT EXECUTE_ALWAYS immediately before the step. This statements tells SAS that this step should ignore checkpoint/restart commands and always execute. This statements tells SAS that this step should ignore checkpoint/restart commands and always execute.

5 June 12, 2009Toronto Area SAS Society5 Adding Checkpoint/Restart to your batch program: –Add the CHECKPOINT EXECUTE_ALWAYS statement before any DATA and PROC steps that you want to execute each time the batch program is submitted. –If your checkpoint-restart library is a user-defined library, you must add the LIBNAME statement that defines the checkpoint-restart libref as the first statement in the batch program. –If you use the WORK library as your checkpoint library, no LIBNAME statement is necessary.

6 June 12, 2009Toronto Area SAS Society6 Run your batch program using the following system options: SYSIN: names the batch program (if req’d in your operating environment) SYSIN: names the batch program (if req’d in your operating environment) STEPCHKPT: enables checkpoint mode STEPCHKPT: enables checkpoint mode STEPCHKPTLIB: specifies the libref of the library where SAS saves the checkpoint restart data STEPCHKPTLIB: specifies the libref of the library where SAS saves the checkpoint restart data

7 June 12, 2009Toronto Area SAS Society7 Run your batch program using the following system options: NOTE: if you are not using a user defined library and using the WORK library instead then: NOTE: if you are not using a user defined library and using the WORK library instead then: –NOWORKTERM: saves the WORK library when SAS ends –NOWORKINIT: does not initialize the WORK library when SAS starts ERRORCHECK STRICT: puts SAS in syntax-check mode when an error occurs in the LIBNAME, FILENAME, %INCLUDE and LOCK statements ERRORCHECK STRICT: puts SAS in syntax-check mode when an error occurs in the LIBNAME, FILENAME, %INCLUDE and LOCK statements ERRORABEND specifies whether SAS terminates for most errors ERRORABEND specifies whether SAS terminates for most errors

8 June 12, 2009Toronto Area SAS Society8 To resubmit a batch job in restart mode Add: Add: –STEPRESTART: tells SAS to restart using checkpoint-restart data saved in checkpoint library (Work or usedefined)

9 June 12, 2009Toronto Area SAS Society9 SAS Commands in batch mode In a Windows Operating Environment: In a Windows Operating Environment: sas -sysin `c:\mysas\myprogram.sas' -stepchkpt sas -sysin `c:\mysas\myprogram.sas' -stepchkpt - stepchkptlib mylibref -errorcheck strict -errorabbend - stepchkptlib mylibref -errorcheck strict -errorabbend Or: Or: sas -sysin `c:\mysas\myprogram.sas' -stepchkpt sas -sysin `c:\mysas\myprogram.sas' -stepchkpt -noworkterm –noworkinit -errorcheck strict -errorabend -noworkterm –noworkinit -errorcheck strict -errorabend Restarting: Restarting: sas -sysin `c:\sas\myprogram.sas' -stepchkpt -steprestart sas -sysin `c:\sas\myprogram.sas' -stepchkpt -steprestart -stepchklib mylibref -errorcheck strict -errorabend -stepchklib mylibref -errorcheck strict -errorabend

10 June 12, 2009Toronto Area SAS Society10 Display Manager Commands Keep in mind… Keep in mind… –Since Checkpoint/Restart modes are meant for batch processing, if SAS comes across a DM command, checkpoint restart modes are turned off and the checkpoint library is deleted.

11 June 12, 2009Toronto Area SAS Society11 Checkpoint/Restart in LSF SAS is currently looking for ways to integrate Checkpoint/Restart into the LSF scheduler. SAS is currently looking for ways to integrate Checkpoint/Restart into the LSF scheduler. Will work with Job rerun and Job requeue Will work with Job rerun and Job requeue Latest word (from SAS Global Forum 2009), look for this functionality in ‘an early 9.2 maintenance release’ Latest word (from SAS Global Forum 2009), look for this functionality in ‘an early 9.2 maintenance release’

12 June 12, 2009Toronto Area SAS Society12 For more info: Checkpoint/Restart on Support.sas.com: http://support.sas.com/documentation/cdl/en/lrcon/61 722/HTML/default/a000993436.htm http://support.sas.com/documentation/cdl/en/lrcon/61 722/HTML/default/a000993436.htm http://support.sas.com/documentation/cdl/en/lrcon/61 722/HTML/default/a000993436.htm http://support.sas.com/documentation/cdl/en/lrcon/61 722/HTML/default/a000993436.htm Other new features in Base 9.2: http://support.sas.com/documentation/cdl/en/whatsne w/62435/HTML/default/baseovwhatsnew902.htm http://support.sas.com/documentation/cdl/en/whatsne w/62435/HTML/default/baseovwhatsnew902.htm http://support.sas.com/documentation/cdl/en/whatsne w/62435/HTML/default/baseovwhatsnew902.htm http://support.sas.com/documentation/cdl/en/whatsne w/62435/HTML/default/baseovwhatsnew902.htm All SAS 9.2 Product Documentation: http://support.sas.com/cdlsearch?ct=80000 http://support.sas.com/cdlsearch?ct=80000 http://support.sas.com/cdlsearch?ct=80000


Download ppt "June 12, 2009 Toronto Area SAS Society 1 What’s new in BASE SAS 9.2 Checkpoint/Restart Rupinder Dhillon Dhillon Consulting Inc."

Similar presentations


Ads by Google