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

Libname in SAS University Edition Again

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 11
Accepted Solution

Libname in SAS University Edition Again

Coded below on SAS Studio. My Univ version runs on Oracle Virtualbox on Linux over Mac. I have uploaded a csv file into the Studio file system. Tried allocating library using both the excel & the pcfiles option. It said the engine was not available. On seeking help, I was asked to type this. Still getting errors, as you in bold after the statements. Can anyone kindly help?
 
libname eclerx odbc required=
59 "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb, *.csv)};
60 DBQ=/folders/myfolders/Data/ECLERX_TEST.csv;
61 READONLY=FALSE";
 
ERROR: The product with which the engine ODBC is associated is either not licensed for your system or the product license has
expired. Please contact your SAS installation representative.
ERROR: Error in the LIBNAME statement.

Accepted Solutions
Solution
‎12-04-2015 01:06 AM
Super User
Super User
Posts: 6,502

Re: Libname in SAS University Edition Again

To read a CSV file you can just write a data step. Usually I just define the variables and then use a variable list in the INPUT statement.  So if your files contains three variables (ID, DATE, AMOUNT) then your program might look like this.

data want ;
   infile '/folders/myfolders/Data/ECLERX_TEST.csv' dsd dlm=',' firstobs=2 truncover;
   length id $20 date 8 amount 8;
   informat date date9.;
   format date date9.;
   input id -- amount ;
run;

If you really don't know what is in your file then you can let SAS try to guess for you by using PROC IMPORT instead.

proc import data=want replace
   datafile='/folders/myfolders/Data/ECLERX_TEST.csv' 
   dbms=dlm
;
   delimiter=',';
run;

View solution in original post


All Replies
Solution
‎12-04-2015 01:06 AM
Super User
Super User
Posts: 6,502

Re: Libname in SAS University Edition Again

To read a CSV file you can just write a data step. Usually I just define the variables and then use a variable list in the INPUT statement.  So if your files contains three variables (ID, DATE, AMOUNT) then your program might look like this.

data want ;
   infile '/folders/myfolders/Data/ECLERX_TEST.csv' dsd dlm=',' firstobs=2 truncover;
   length id $20 date 8 amount 8;
   informat date date9.;
   format date date9.;
   input id -- amount ;
run;

If you really don't know what is in your file then you can let SAS try to guess for you by using PROC IMPORT instead.

proc import data=want replace
   datafile='/folders/myfolders/Data/ECLERX_TEST.csv' 
   dbms=dlm
;
   delimiter=',';
run;
Super User
Posts: 17,868

Re: Libname in SAS University Edition Again

ODBC isn't licensed within SAS UE. Have you set up the shared drive? Can you navigate on the left hand menu to your myfolders and see the file?

If so, the code from @Tom will work.
Occasional Contributor
Posts: 11

Re: Libname in SAS University Edition Again

Thanks to both of you.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 706 views
  • 1 like
  • 3 in conversation