Date: Fri, 9 Dec 2005 16:17:07 -0500
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject: Re: Weired "Expecting a name" error on PROC IMPORT
Here is an excerpt from my log, unedited (except for the license info),
which runs your code exactly as posted:
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) 9.1 (TS1M3)
Licensed to xxxxx, Site xxxxx.
NOTE: This session is executing on the XP_PRO platform.
NOTE: SAS 9.1.3 Service Pack 3
NOTE: SAS initialization used:
real time 1.33 seconds
cpu time 0.99 seconds
1 proc import datafile='c:\temp\a\b\c\d\abc_cde_fgh_123.xls'
2 out=work.abc dbms=excel replace;
3 getnames=yes;
4 run;
NOTE: WORK.ABC was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 3.07 seconds
cpu time 0.68 seconds
So as Jim suggests, something more is probably needed in the way of context.
On Fri, 9 Dec 2005 11:07:27 -0500, Jim Groeneveld <jim1stat@YAHOO.CO.UK>
wrote:
>Hi Mark,
>
>That error message often appears in the log way after the real error.
>Please also send that part of the log to SAS-L where the error emerges
>firstly and the underlining of the error in the program line.
>
>Only then we can help you further. This is an example of too less info.
>
>Regards - Jim.
>--
>Y. (Jim) Groeneveld, MSc., Biostatistician, Vitatron b.v., NL
>Jim.Groeneveld_AT_Vitatron.com (replace _AT_ by AT sign)
>http://www.vitatron.com, http://home.hccnet.nl/jim.groeneveld
>
>My computer regards me as its master, but I seem to be its slave.
>
>[common disclaimer]
>
>On Fri, 9 Dec 2005 07:29:19 -0800, Mark <joystar.jin@GMAIL.COM> wrote:
>
>>I am using SAS 8. Sometimes I got weird error from PROC IMPORT like
>>below.
>>It always says "ERROR 22-322: Expecting a name". From my observation,
>>this error
>>tends to happen when the path of the file is long OR the name of the
>>excel file is long.
>>
>>I can't figure out. Does anyone has similar experience? Your help is
>>appreciated.
>>
>>proc import datafile='c:\temp\a\b\c\d\abc_cde_fgh_123.xls'
>> out=work.abc dbms=excel replace;
>> getnames=yes;
>>run;
>>
>>ERROR 22-322: Expecting a name.
>>ERROR 76-322: Syntax error, statement will be ignored.
>>ERROR: Import unsuccessful. See SAS Log for details.
>>
>>Thanks,
>>
>>Mark
|