BookmarkSubscribeRSS Feed
Seb_A_Sanders
Calcite | Level 5

Hi,

 

I'm in the process of creating an automation script for the daily SAS reports and I have some key issues that I'd really appreciate assistance with.

 

Error checking / reporting

So I have an array of projects:

prjPaths = Array("Report1.egp","Report2.egp".... ) and so on.

Currently there are 17 as a proof of concept but this will double when I have ironed out the issues. I loop through this array with:

For Each prjName in prjPaths

which is working fine, however we have quite a temperamental environment / VPN. So what I'm trying to achieve is to log in a simple manner whether a workflow has run without errors (warnings I don't mind). Any ideas on how to write this for each report to a file?

 

Array gathering

All these Report.egp are in different folders and may be modified / updated to new versions by any member of the team. I built a vbscript to create a text array by searching for EGP files in locations, but when I include this and use the "strText" in the above prjPaths = Array("strText") it doesn't work, but if I write this to a file it's exactly how I've manually put the list into the array. Again, any ideas?

 

Monitoring

Last one I promise! 

When you run a script for SAS it runs in the background and you can see in the task manager that something is running but not which. I have a MsgBox at the end to tell me that it's all run, but it would be great to see that it's currently running or even better, which part of the array is currently running.

 

Thanks for any and all help!

2 REPLIES 2
AlanC
Barite | Level 11

As stated on here before, run PowerShell vs VBScript. There are plenty of examples on using PowerShell and SAS. See if that clears up a number of your questions.

 

Start there. I wouldn't spend another minute in VBScript.

https://github.com/savian-net
ballardw
Super User

Seems like you two main issues resolve around the VBscript part. So probably should ask on a VBscript forum, especially since you do not actually include any of the SAS portion.

 

You might describe your SAS environment. Depending on specifics of what the "automation script" is supposed to do there may be tools in SAS that does what is needed.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 332 views
  • 0 likes
  • 3 in conversation