Help using Base SAS procedures

Executing VBA through SAS(Unix platform)

Reply
Contributor
Posts: 22

Executing VBA through SAS(Unix platform)

Hi all,

I want to automate my process can any one help me to execute the VBA codes through SAS.

Currently i am doing in three steps :

1) Executing SAS codes to get the data.

2) Exporting the datasets

3) Executing the VBA codes .

I want to make it into one step.Please help me and i have one more doubt how a SAS in Unix system interacts with Windows(Excel) system.

Thanks & Regards

Karthik Srivasthav...

Super User
Super User
Posts: 7,984

Re: Executing VBA through SAS(Unix platform)

Posted in reply to KarthikSrivasthav

As far as I am aware, Excel does not exist on Unix as it is a Windows system.  I imagine you are creating files on Unix which can be read by Excel, e.g. ods tagsets.excelxp, csv, but seeing as you can't start the office engine on Unix I don't see how you would execute VBA which embedded in Office.

Without further information its hard to say, but you could look at it the other way round.  Have your data exported from SAS as normal.  Then have an Excel file with an OnOpen sub which knows to load the exported datafile.  That Excel file could then run other macros as needed.

Oh, and just to add, why would you want to run VBA macros at the end.  Output from SAS is more of a review tool, Excel is not good for <insert task here>.

Trusted Advisor
Posts: 2,116

Re: Executing VBA through SAS(Unix platform)

Posted in reply to KarthikSrivasthav

If you have Enterprise Guide available, you could package the steps inside EGuide and run the project.  You could even run the project unattended.  Chris H. has some guidance for embedding VBA in EGuide on the SAS Dummies blog.

You may also be able to embed the call for SAS execution in the SAS add-in for Microsoft Excel.  You may need additional product to get that to work.

Super User
Posts: 19,855

Re: Executing VBA through SAS(Unix platform)

Posted in reply to KarthikSrivasthav

There's not enough information to answer your question.

Yes, it's possible but you need to explain in more detail what you'd like.

For starters:

Are you using SAS or EG? What version? Are you on a server or desktop or combination?

What do you mean by exporting the data sets? Why is that not part of the SAS program?

What does your VBA do? Can that be embedded in SAS?

Ask a Question
Discussion stats
  • 3 replies
  • 523 views
  • 0 likes
  • 4 in conversation