LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 16 Sep 2003 14:38:57 -0400
Reply-To:     Bruce Johnson <bjohnson@SOLUCIENT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Bruce Johnson <bjohnson@SOLUCIENT.COM>
Subject:      Re: ODBC problem!

It also looks like you're missing a quote...?

________________________________ Bruce A. Johnson bjohnson@solucient.com

-----Original Message----- From: Prasad S Ravi [mailto:prasad.s.ravi@HOUSEHOLD.COM] Sent: Tuesday, September 16, 2003 1:09 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: ODBC problem!

Can you try using double quotes in the libname statement instead of single quotes and see if it works?. also make sure the file sha.xls exists and looks OK in C:\ drive.

Prasad Ravi

"Elmaache, Hamani" <Hamani.Elmaache@CCRA To: SAS-L@LISTSERV.UGA.EDU -ADRC.GC.CA> cc: Sent by: "SAS(r) Subject: ODBC problem! Discussion" <SAS-L@LISTSERV.UGA.E DU>

09/16/2003 10:35 AM Please respond to "Elmaache, Hamani"

Hi there. I trying to use ODBC to order to get from Excel data set. But it does't work. Here my code and Error message, if somebody can help:

libname xl odbc noprompt='dsn=Excel Files; dbq=C:\sha.xls';

proc sql noprint; select distinct "xl.'"||trim(memname)||"'n" into :xlsheets separated by ' ' from dictionary.members where libname='XL' and index(memname,'$')>0; quit;

data sha; set &xlsheets; run; ********************************* LOG: 651 dbq=C:\sha.xls'; ERROR: CLI error trying to establish connection: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specifie ERROR: Error in the LIBNAME statement. 652 653 proc sql noprint; 654 select distinct "xl.'"||trim(memname)||"'n" 655 into :xlsheets separated by ' ' 656 from dictionary.members 657 where libname='XL' and index(memname,'$')>0; NOTE: No rows were selected. 658 quit; NOTE: PROCEDURE SQL used: real time 0.00 seconds cpu time 0.00 seconds

659 660 data sha; NOTE: SCL source line. 661 set &xlsheets; - 22 -------- 202 WARNING: Apparent symbolic reference XLSHEETS not resolved. ERROR: File WORK.XLSHEETS.DATA does not exist. ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, END, KEY,KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.

This message is a private communication. It may contain information that is confidential and legally protected from disclosure. If you are not an intended recipient, please do not read, copy or use this message or any attachments, and do not disclose them to others.

Please notify the sender of the delivery error by replying to this message, and then delete it and any attachments from your system. Thank you. Solucient LLC.


Back to: Top of message | Previous page | Main SAS-L page