Learning SAS? Welcome to the exclusive online community for all SAS learners.

Importing file sas studio University Edition

Reply
New Contributor
Posts: 3

Importing file sas studio University Edition

Here is my code

libname ibrah '/folders/myfolders/myImported';

proc import datafile='/folders/myfolders/amsus/data/myExcel.xls';

    out=ibrah.myExcel;

    dbms=xls replace;

run;

title 'After Using proc import';

proc contents data=ibrah.myExcel;

run;

proc print data=ibrah.myExcel;

run;

And here is my errors and try everything I couldn't fix it

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 libname ibrah '/folders/myfolders/myImported';

NOTE: Libref IBRAH was successfully assigned as follows:

  Engine: V9

  Physical Name: /folders/myfolders/myImported

44 

45 proc import datafile='/folders/myfolders/amsus/data/myExcel.xls';

ERROR: Output SAS data set must be provided.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

  real time 0.00 seconds

  cpu time 0.01 seconds

  

46 out=ibrah.myExcel;

47 dbms=xls replace;

48 run;

49 

50 title 'After Using proc import';

51 

52 proc contents data=ibrah.myExcel;

ERROR: File IBRAH.MYEXCEL.DATA does not exist.

53 run;

NOTE: Statements not processed because of errors noted above.

NOTE: PROCEDURE CONTENTS used (Total process time):

  real time 0.01 seconds

  cpu time 0.01 seconds

  

NOTE: The SAS System stopped processing this step because of errors.

54 

55 proc print data=ibrah.myExcel;

ERROR: File IBRAH.MYEXCEL.DATA does not exist.

56 run;

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE PRINT used (Total process time):

  real time 0.01 seconds

  cpu time 0.01 seconds

  

57 ;

58 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

68 ;

Please help !!!

Both folders in the path files are shared folders but the amsus folder is read only

Super User
Posts: 10,476

Re: Importing file sas studio University Edition

proc import datafile='/folders/myfolders/amsus/data/myExcel.xls'; <=REMOVE THIS ; The input file and output data set are part of the same statement so NO semicolon.

  

46 out=ibrah.myExcel; <= Remove this ; as well, the DBMS is part of the same statement.

Super User
Posts: 17,777

Re: Importing file sas studio University Edition

Use the proc import snippet that's provided in SAS UE, specifically where the semicolons are located. You have too many.

PROC IMPORT DATAFILE="<Your XLS File>"

     OUT=WORK.MYEXCEL

     DBMS=XLS

     REPLACE;

RUN;

/** Print the results. **/

PROC PRINT DATA=WORK.MYEXCEL; RUN;

Ask a Question
Discussion stats
  • 2 replies
  • 938 views
  • 0 likes
  • 3 in conversation