Your SAS programs, embedded in web apps and elsewhere

Calling a stored process from command line in SAS 9.2

Reply
N/A
Posts: 0

Calling a stored process from command line in SAS 9.2

Hi,
We are currently using SAS 9.1.3 on our platform and planning to migrate to 9.2 very soon. I wanted to make sure about something thats in place today will work when we switch over to the newer version. So here are the details -

We have a task in place where it calls SAS.exe via command line. Essentially there is a batch file with a piece of code looking like this -

"C:\Program Files\SAS\SAS 9.1\sas.exe" "C:\sas_run\TEST.SAS"

Does 9.2 allow calling the sproc like this via command line?

Any inputs/thoughts?

Thanks,
Sudhir
SAS Employee
Posts: 284

Re: Calling a stored process from command line in SAS 9.2

Who determines how and when the batch file is executed?

Vince DelGobbo
SAS R&D
N/A
Posts: 0

Re: Calling a stored process from command line in SAS 9.2

There is a scheduled database job running on MS SQL Server 2005 that executes a batch file sitting locally on the DB server. Based on some criteria (I guess you can call it business logic), it runs the batch file. This local batch file then uses PSEXEC to remotely execute another batch file sitting on the SAS Server.
N/A
Posts: 0

Re: Calling a stored process from command line in SAS 9.2

Confirmed with SAS Support that there will be no issues to run the stored process via command line in 9.2. Just thought of updating it over here.
SAS Employee
Posts: 284

Re: Calling a stored process from command line in SAS 9.2

Yes, you can use the command you stated earlier, but be aware that you are not really running a stored process. What you are doing is executing the underlying SAS code in batch mode, under the userid that starts the process.

The success of this method depends on what the SAS code is doing.

We are researching ways to formally run stored processes, and may include that functionality in a future release.

Vince DelGobbo
SAS R&D
Ask a Question
Discussion stats
  • 4 replies
  • 280 views
  • 0 likes
  • 2 in conversation