Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running SAS by VB OLE Heko

Status
Not open for further replies.

Dogss

Technical User
Oct 17, 2006
4
AU
Hello all,

I am running a program in VB that generate 4 variables (B1,B2,B3,B4). I have a quartic polynomial equation such that

B1x^4 + B2x^3 + B3x^2 + B4x = 0

Where I need to solve for x

I was having great difficulty in trying to solve this using VB script and thought it may be simpler to solve using SAS.

I have built a SAS command that solves this effectively.

proc iml;
use foriml;
READ all var {B1 B2 B3 B4} INTO p;
result = polyroot(p);
create quarticsolved from results;


It is a simple code to open SAS

Dim OleSAS As Object
Set OleSAS = CreateObject("SAS.Application")
OleSAS.Visible = True

But my problem is I do not know how to pass the variables and read the results.

Any help would be greatly appreciated.

M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top