I actually have been back on forth with SAS Tech support on this one...
I am trying to run a scheduled process and SAS keeps throwing errors one me.
Lastest :
ERROR: Unrecognized SAS option name MYDRIVE:\OUT.SAS.
ERROR: (SASXKRIN): KERNEL RESOURCE INITIALIZATION FAILED.
ERROR: Unable to initialize the SAS kernel.
Here is what I currently have in line one of the bat file :
"C:\Program Files\SASHome\SASFoundation\9.3\sas.exe" -SYSIN MYDRIVE:\OUT.sas -log MYDRIVE:\OUT.log -print MYDRIVE:\OUT.lst
Thoughts on what could be throwing it ?
SAS tech support says it was because of the log and print was originally not included.
I originally had it just as SYSIN.
Your error is indicating some scripting error made in the batch file (.bat). The processing of SAS looking at config options will stop immediate when it detects an error.
Stopping is done when interpreting de -sysin option ( I would prefer the lower case, sometimes upcase is causing errors) .
The batch processing in the 9.3 documentation Windows looks not be updated from history (8.2 not 9.3). SAS(R) 9.3 Companion for Windows
The -sysin SAS(R) 9.3 Companion for Windows should switch some settings form interactive to batch. I remember SAS versions this was not working correctly
Getting the rootcause is debugging possible cases.
An error on the filename could be caused by special characters in the file-name / directory name. You will need quotes around those when this happens.
When the issue is having a complicated directory-name an easy solution can be setting the current directory at windows according your needs. Do not code this anymore in your sas-batchcall statement.
Is your script nested using the %1 %2 etc there can be a fundamental text processing issue. This is something you could recognize with C-programming experience
A parameter list in C is defined as a list of strings each separated by one binary-zero. The list ends with two binary zero-s. A binary zero and space are both seen as blank.
A string can be composed all type of common known characters each word separated by blanks.
You cannot see the difference between those two but they are technical being different. This is the same at Unix where there is a solution for this issue having the $* reference indicating not to parse the string but keeping the string as is.
The issue: a list of options with SAS should be a real string not being parsed into a list.
Not following this requirement will cause errors as you have described.
I think you are having a local SAS installation.
Do you have a BI/DI installation with a metadataserver your platform admin can define a batch server that is having a script for batch-processing.
That is were tot ..\Lev1\... naming of Patrick is coming from.
Does "MyDrive" have a drive letter assigned in Windows or are you just hiding the fact that you are trying to use F:\ or some other drive letter?
I just wrote that over it.
lets call it C:\temp\
Assuming there is a file "c:\temp\OUT.sas" then can you try to run below and tell us how it went?
"C:\Program Files\SASHome\SASFoundation\9.3\sas.exe" -SYSIN c:\temp\OUT.sas -log c:\temp\OUT.log -print c:\temp\OUT.lst -nosplash -icon
In case you have an server context set-up then you could also use a command like below which then gives you this servers environment by executing all the cfg's and autoexecs as defined in sas.bat:
"C:\SAS\Config\Lev1\SASApp\sas.bat" -SYSIN c:\temp\OUT.sas -log c:\temp\OUT.log -print c:\temp\OUT.lst -nosplash -icon
Your error is indicating some scripting error made in the batch file (.bat). The processing of SAS looking at config options will stop immediate when it detects an error.
Stopping is done when interpreting de -sysin option ( I would prefer the lower case, sometimes upcase is causing errors) .
The batch processing in the 9.3 documentation Windows looks not be updated from history (8.2 not 9.3). SAS(R) 9.3 Companion for Windows
The -sysin SAS(R) 9.3 Companion for Windows should switch some settings form interactive to batch. I remember SAS versions this was not working correctly
Getting the rootcause is debugging possible cases.
An error on the filename could be caused by special characters in the file-name / directory name. You will need quotes around those when this happens.
When the issue is having a complicated directory-name an easy solution can be setting the current directory at windows according your needs. Do not code this anymore in your sas-batchcall statement.
Is your script nested using the %1 %2 etc there can be a fundamental text processing issue. This is something you could recognize with C-programming experience
A parameter list in C is defined as a list of strings each separated by one binary-zero. The list ends with two binary zero-s. A binary zero and space are both seen as blank.
A string can be composed all type of common known characters each word separated by blanks.
You cannot see the difference between those two but they are technical being different. This is the same at Unix where there is a solution for this issue having the $* reference indicating not to parse the string but keeping the string as is.
The issue: a list of options with SAS should be a real string not being parsed into a list.
Not following this requirement will cause errors as you have described.
I think you are having a local SAS installation.
Do you have a BI/DI installation with a metadataserver your platform admin can define a batch server that is having a script for batch-processing.
That is were tot ..\Lev1\... naming of Patrick is coming from.
if "Mydrive" contains blanks or other special characters, you need to enclose the complete path name to your source/log/print files in quotes.
I am running 9.3!
I ended up changing -SYSIN to lowercase and then using the -icon and -nosplash ( I know one of these just suppresses the popup window).
I had two other process in the bat file but ended up just lowercasing the sysin - as opposed to outputting the log and list in a certain directory.
They ended up working fine.
Thanks!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.