03-13-2014 04:04 AM
I would like to know whether it is possible to run SAS programs from a JAVA (e.g. Eclipse) running on a WINDOWS computer; and if yes, what is the best way.
Thank you in advance.
03-14-2014 10:39 AM
Use the SAS IOM Bridge which allows you to use CORBA in your Java application (e.g inside Eclipse) to remotely execute SAS code as well as reading SAS data.
The SAS AppDev Studio comes with the required JARs.
In Eclipse you have to add the libraries under SASVersionedJarRepository which you will find under your local SAS installation.
The Lexjansen approach previously mentioned by RW9 does not actually run the SAS program but generates SAS code from Java then you have to submit the generated program using SAS connect.
The best way?
If you must run the SAS code from inside the Java application either you have to use SAS IOM Bridge. This requires understanding of SAS IOM as well as CORBA to set up.
Altenatively you need sas.exe on your system then you can use Runtime.getRuntime().exec from inside eclipse.
Choose what suits your environment and skills the best.