I have a SAS script that I initiate from a batch script. When I ran the batch script earlier, the log said that the file I tried to import ran into an error, as below:
ERROR: XLSX file does not exist -> C:......\etc\excelfile.xlsx NOTE: The SAS System stopped processing this step because of errors.
When I ran the same script manually from the SAS UI, the script ran fine without any errors. When I looked at the log on that occasion, below were the notes for same file I had issues when importing from batch:
NOTE: The import data set has 1000 observations and 100 variables. NOTE: WORK.have data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time): real time 3.06 seconds cpu time 2.23 seconds
It might be worth mentioning that this SAS script imports other files also, and they imported fine - even when initiated from batch. Has anyone else ran into this issue before?
Batch Script:
"C:\Program Files\SASHome\x86\SASFoundation\9.3\sas.exe" -SYSIN
"C:\...\...\..\etc\sas_script_file.sas" -PRINT
"C:\...\...\...\....\etc\sas_script_file.lst"
Import Procedure on SAS:
proc import OUT=work.have (keep = col1 col2 col3 col4)
datafile="C:\...\...\...\etc\excelfile.xlsx"
DBMS=XLSX REPLACE;
SHEET= "Sheet1";
run;