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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a SAS program(batch submit) in Java code

Status
Not open for further replies.

ki1ki

Programmer
May 20, 2010
2
US
I need to know with base SAS, how do we make a sas program run in batch mode from java
 
Of course there may be several ways, but you can run the SAS program as a shell. (I work with Windows/DOS but you can adapt this to UNIX as well).

What you need to do is launch an instance of SAS and have that instance run your SAS code.

In windows you need to pass the following args to the OS for it to run.
...\sas.exe -autoexec "your SAS program"

When called, the SAS instance will start and run the code in your autoexec file location. What I do when I use this method is to have the ENDSAS statement in the last line of the SAS program so that the SAS instance will close after it finishes.

Klaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top