Architecting, installing and maintaining your SAS environment

Schedule sas code on a windows server - script

Reply
Regular Contributor
Posts: 237

Schedule sas code on a windows server - script

Hello,

I'm looking for a few hours now, but can't find the correct way.

We have a windows server 2008 R2, and i want a new scheduled task which will execute .sas code.

I found something like this but it does not work. The path to the sas.exe is correct.

"C:\SAS\SASHome\SASFoundation\9.4\sas.exe" -sysin "D:\X\Y\Z\selections.sas"

Thanks,

Filip

Super User
Posts: 7,827

Re: Schedule sas code on a windows server - script

"does not work" is a little sparse, if I may say so.

What happens exactly (error message)?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Regular Contributor
Posts: 237

Re: Schedule sas code on a windows server - script

Capture.JPG

I get this error when i want to execute this from scheduled tasks.

Super User
Posts: 7,827

Re: Schedule sas code on a windows server - script

Then there is MUCH more to it than what you posted initially (a complete VB script)

Look here:

Code 800A0400 - Expected  statement error in VBScript

This is a visual basic script error, most probably a syntax error. Not caused by SAS at all.

Simply google 800A0400

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Regular Contributor
Posts: 237

Re: Schedule sas code on a windows server - script

Posted in reply to KurtBremser

Yes i already took a look but I got no knowledge of vb scripting

Super User
Posts: 7,827

Re: Schedule sas code on a windows server - script

"no knowledge of vb scripting"

Then acquire it. Now. You must know your tools in order to use them.

Since I'm a UNIX admin, I could help you with UNIX shell scripts. I don't know how to do VBS.

But you still could post the VBS script here, so that someone who knows VBS can point out the error.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Trusted Advisor
Posts: 3,214

Re: Schedule sas code on a windows server - script

The Eguide tool is using a VBScript to deploy scripts in a local (on your desktop/eguide) machine.

http://blogs.sas.com/content/sasdummy/2011/05/03/using-sas-enterprise-guide-to-run-programs-in-batch... the disadvantage of this it is a stand alone based and does not fit into an Enterprise one.
There is commonly no need to Unix-scripting VB-scripting as it part of the sas admin role. Setting up a batch-server that is a script just to start sas programs it is part of the EIP approach that should be abbreviated as Enterprise Intelligence Platform although it is more often an department silo stand alone one just being there and not part of the main analytics goal.

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 6 replies
  • 508 views
  • 0 likes
  • 3 in conversation