copyright © 2010, sas institute inc. all rights reserved. sas ® easyapi safemode a usage scenario

15
Copyright © 2010 , SAS Institute Inc. All rights reserved. SAS ® EasyAPI SafeMode A Usage Scenario

Upload: andra-mcdonald

Post on 26-Dec-2015

219 views

Category:

Documents


1 download

TRANSCRIPT

Copyright © 2010 , SAS Institute Inc. All rights reserved.

SAS® EasyAPI SafeModeA Usage Scenario

Problem:You want to automate SAS© and other non-SAS© data updates and reporting using the Application Programming Interface (API). Despite the possibility of system crash (outside of your automation program control), you want to ensure the job can be completed safely in a “single-shot” (no redundancy of re-running successful jobs).

Solution:SAS EasyAPI with SafeMode technology

Notice the highlighted tasks in the EasyAPI script.

We’ll need to export Data 1006, 1013, 1014 firstBefore the EG Graph HTML report can be generated.

The same with the SAS ODS report. Data 1017, 1022, 1027 and 1030

must be exported successfully first.

With no complex user-interfaces or programming knowledge to learn,

EasyAPI users can “sequentially batch” the jobsAnd be notified by email once it’s done.

Let’s see what happens when we run our EasyAPI scriptwithout SafeMode.

The user simply double-clicks on “No SafeMode” shortcutWhich would run EasyAPI without SafeMode.

So far so good.

Notice “Data 1006.zip” has been exported.“Data 1013.zip”, “Data 1014.zip” – and even the

EG Graph html report (Bar.html) have been generated.

They are running in the exact sequential order we want.

EasyAPI has built-in error handlers that check the logsFor trappable errors and email them.

But what about system crashes? We can’t trap those.

No automation framework that we’re aware of can Handle those either!

Oops. A crash.

“… the information you were working on might be lost.”?

When it comes to a system crash, it can be veryChallenging to deal with because of its random nature.

Sometimes it happens, sometimes it doesn’t.

The system crash can be caused by Network, hardware, kernel or other systems latency

That is outside the control of EasyAPI (or any automation framework for that matter).

EasyAPI keeps track of at what point the crashHappened.

Based on the log (SafeMode.txt), the crashHappened at the

“c:\ABM\XML\export1022.xml” task.

Notice, the last successful export was for “Data 1017.zip”. So yes, the smart thing to do for EasyAPI is to close the System Crash window and

Then simply re-submit the jobFrom this “Last point of failure”.

This would remove redundancy of re-running successful jobsAnd would allow us to proceed safely to the finish line.

This is where SafeMode comes in handy.

Let’s see what happens when we run our EasyAPI scriptwith SafeMode.

The user simply double-clicks on “SafeMode” shortcutWhich would run EasyAPI with SafeMode.

Notice EasyAPI “spawned” a separate non-intrusive thread process called “SafeMode.exe”

It runs in the background (visible through Windows Task Manager only).

The light-weight thread monitors for the System crash problem window in real-time.

It would terminate the problem Window if It detects one and then re-submit

The job from the “last point of failure”-line.

Notice in the background“Data 1006.zip” all the way down to the

“ODS.html” report have been successfully generated.

SafeMode intelligently took care of the system crashAnd allowed us to run the entire job

safely in a “single-shot”.

We also got the SUCCESS email notice.

Let’s look at the 2 HTML reports we’veJust generated – shall we?

We’ll close with the next Flowchart screen that summarizes theEntire EasyAPI SafeMode process.

Copyright © 2010 , SAS Institute Inc. All rights reserved.

Thank You