Hi All,
I have a .bat file which runs SAS scripts in the background.
The job has to pick a number of .csv files and .xls files from a specified path and run it to update the database.
The job is failing to pick the .xls file and failing with the error that. the .xls file was not found. But, that is not the case as the file is already present in that specified path.
If i run the SAS script individually, there are no errors.
There has been no code change in the previous months.
There was a server upgrade where the server was upgraded from Windows server 2008 to Windows server 2012. Is that related to this?
Could you guys please help me with a solution for this?
Regards,
Sreelekha
Windows has such a convoluted security "concept" that it is quite easy to have different permissions (and/or network mounts) between a job run in interactive and a job run in batch mode, as those are different contexts even with the same user-id.
Note: when SAS tells you a file is not there, it's not there, period. Which can mean that the file is actually there, but there is not accessible to the SAS process at this very moment.
Thank you for your reply.
But the other CSV files from the same path are accessible. Since, yesterday I have been getting this error. Hence, this isnt momentary.
Are you sure the file is there, if the program tells you its not, I am going to believe that I am afraid. Note that:
"XYZ.xlsx" is not "X YZ.xslx"
and
"XYZ.xls" is not "XYZ.xlsx"
For example. AS we can't see anything of your process, can't help further.
Note, why on earth are you using xls file format, which is decades out of support. Move to XLSX, or better still bin Office in totum and go with nice plain open source files.
Yes,
But the individual script is running fine. Absolutely no errors.
Maybe that excel is open or locked.
Try to copy that excel to somewhere and import the copy file again.
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.