Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Running SAS from command line

Running SAS from command line

Running SAS from command line

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!

RE: Running SAS from command line

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.

RE: Running SAS from command line

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

RE: Running SAS from command line

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close