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

Running SAS from command line

Status
Not open for further replies.

fyr

Programmer
Jan 4, 2002
11
US
Hi,
We are running a server copy of SAS (UNIX) and there are a couple programs that we run on a fairly regular basis. We were wondering if there was a way to run SAS programs from the command line, without even having to go in to SAS.

Any help or nudge in the direction would be appreciated!
fyr
 
Not so sure what you mean "command line".

You can submit a sas job as a foregroud job:
sas YourJobName.
But this will hold up you unix session.
You can also submit a sas job as a backgroud job:
nohup sas YourJobName &.
This will not hold up you session and when you log out, you job continue to run.
 
I do this all the time in Windows... and has been a LONG time for me since programming UNIX at AT&T... but it should be similar

I have batch files set up to run on a scheduled basis on a 'dog' machine on the network. The one drawback is that SAS & the scheduled tasks do not run as a service, so the machine needs to be logged in ALL of the time.

In your batch file put
"C:\Program Files\SAS Institute\SAS\V8\sas.exe" -sysin "path and full program name.sas"

SAS's site has a nice blurb on doing it too
ftp://ftp.sas.com/techsup/download/technote/ts648/ts648.html


 
This is great. We use autosys in UNIX and we wanted a way to call the specific programs from autosys. Thank you so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top