Top Banner
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.

Dec 26, 2015

Download

Documents

Andra McDonald
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Copyright © 2010, SAS Institute Inc. All rights reserved. SAS ® EasyAPI SafeMode A Usage Scenario.

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

SAS® EasyAPI SafeModeA Usage Scenario

Page 2: Copyright © 2010, SAS Institute Inc. All rights reserved. SAS ® EasyAPI SafeMode A 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

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

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.

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

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.

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

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!

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

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).

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

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.

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

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.

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

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.

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

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”.

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

We also got the SUCCESS email notice.

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

Page 12: Copyright © 2010, SAS Institute Inc. All rights reserved. SAS ® EasyAPI SafeMode A Usage Scenario.
Page 13: Copyright © 2010, SAS Institute Inc. All rights reserved. SAS ® EasyAPI SafeMode A Usage Scenario.

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

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

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

Thank You