BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ddonishchenko
Fluorite | Level 6

Hi, I'm using SAS 9.1 on Windows Server 2003 Standard Edition. I'm trying to run two programs in a batch mode. My .bat file contains exactly two rows:

Start "D:\PROGRAM FILES\SAS\SAS 9.1" -SYSIN "C:\MyFolder\prog1.sas"
Start "D:\PROGRAM FILES\SAS\SAS 9.1" -SYSIN "C:\MyFolder\prog2.sas"

After I double-click on the .bat file icon, the following message appears: "Windows cannot find 'SYSIN'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search".

How could this be fixed?

Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Try it without the "start". I don't think it's necessary at all. And you are specifiying a path to a directory instead of the executable.

So I'd go with

 "D:\Program Files\SAS\SAS 9.1\sas.exe" -SYSIN "C:\MyFolder\prog1.sas"

instead

View solution in original post

5 REPLIES 5
RahulG
Barite | Level 11
"D:\PROGRAM FILES\SAS\SAS 9.1\sas.exe" -SYSIN "C:\MyFolder\prog1.sas"
"D:\PROGRAM FILES\SAS\SAS 9.1\sas.exe" -SYSIN "C:\MyFolder\prog2.sas"

I have updated your command and added sas.exe

1. Call of sas.exe is missing in your command.

2. Do double check if prog1.sas , prog2.sas exists.

3. If still, it do not exist then try keeping the program on the same drive where SAS installed.

4. If your program executes some environment variable are missing then you may have to call config file

 

"D:\PROGRAM FILES\SAS\SAS 9.1\sas.exe" - config "D:\PROGRAM FILES\SAS\SAS 9.1\sasv9.cfg" -SYSIN "C:\MyFolder\prog1.sas"
ddonishchenko
Fluorite | Level 6

Location to save the programs in is a required parameter, so I can't move the .sas file to the drive where SAS is installed. When I execute the code with your updates, I get a new message regarding "Kernel resource initialization failed" (please see attached).


SAS Message Log.PNG
Kurt_Bremser
Super User

Try it without the "start". I don't think it's necessary at all. And you are specifiying a path to a directory instead of the executable.

So I'd go with

 "D:\Program Files\SAS\SAS 9.1\sas.exe" -SYSIN "C:\MyFolder\prog1.sas"

instead

ddonishchenko
Fluorite | Level 6

Thanks a lot, Kurt! That's exactly what I needed. Regarding the upgrade - I'm aware we need it, and we are working on it, of course.

Kurt_Bremser
Super User

And you're in serious need of upgrades. Windows Server 2003 is out of support since last year, and SAS 9.1 is in stage C support, IIRC. Which means the standard answer of SAS TS to any problem will contain "upgrade to 9.4".

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1082 views
  • 1 like
  • 3 in conversation