08-14-2016 08:27 AM
/** Import an XLSX file. **/
libname g '/folders/myfolders/';
PROC IMPORT DATAFILE="/folders/myfolders/grocery_coupons.xls";
/** Print the results. **/
PROC PRINT DATA=g.permanent; RUN;
08-14-2016 09:43 AM
The error is the same as in your last question.
There is no semicolon after the file path.
08-14-2016 10:11 AM
08-14-2016 10:50 AM - edited 08-14-2016 10:51 AM
I always place the semi-colon on a multiple line statement on a new line and align it with the beginning of the statement. The lines in between are indented. The same way that I format DO/END blocks of code.
I find that is makes it much less likely that I will accidently insert an extra semi-colon into the middle of long statements.
libname g '/folders/myfolders/'; PROC IMPORT DATAFILE='/folders/myfolders/grocery_coupons.xlsx' OUT=g.permanent DBMS=XLSX REPLACE ; RUN;