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 (January 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Jan 2009 15:05:24 -0600
Reply-To:     Mary <mlhoward@avalon.net>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mary <mlhoward@AVALON.NET>
Subject:      Re: Proc Import: unsuccessful, Expecting an name
Comments: To: "S. KUMAR" <cardinalcure@gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

It is talking about SCL; perhaps check what you are doing just before it and make sure you have quit out of SCL; also it should be datarow=2; not datarow=n;

-Mary ----- Original Message ----- From: S. KUMAR To: Mary Sent: Wednesday, January 21, 2009 2:59 PM Subject: Re: Proc Import: unsuccessful, Expecting an name

Thanks, I am still geting the following error message.

276 PROC IMPORT DATAFILE = "M:\Cadence\APA352\SA\SASDATA\Protocol Deviations

276! 352.xls"

277 OUT = PD

278 DBMS=EXCEL2000 REPLACE;

NOTE: The previous statement has been deleted.

279 GETNAMES=yes;

NOTE: SCL source line.

280 DATAROW=n ;

-------

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

281 RUN;

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

NOTE: PROCEDURE IMPORT used:

real time 0.00 seconds

cpu time 0.00 seconds

On Wed, Jan 21, 2009 at 2:49 PM, Mary <mlhoward@avalon.net> wrote:

The syntax looks OK; you might add:

DATAROW=2;

Perhaps check your file and make sure that variable names are in the first row. Another thing you could try is to save it as a tab-delimited file and then change to DBMS=TAB to see if it can read it that way.

-Mary ----- Original Message ----- From: cardinalcure@GMAIL.COM To: SAS-L@LISTSERV.UGA.EDU Sent: Wednesday, January 21, 2009 2:27 PM Subject: Proc Import: unsuccessful, Expecting an name

I am getting this error from PROC IMPORT like below.

It says "ERROR 22-322: Expecting a name". When I use the exact same code for a different file then the import is successful.

PROC IMPORT OUT = work.pd1 DATAFILE = "C:\AT\ATA222\MA\SASDATA\American Textile 111.xls" DBMS=EXCEL2000 REPLACE; GETNAMES=yes; RUN;

Following is the complete information from the log:

ERROR 22-322: Expecting a name. ERROR 76-322: Syntax error, statement will be ignored. SYMBOLGEN: Macro variable _IMEXSERROR_ resolves to SERROR ERROR: Import unsuccessful. See SAS Log for details. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE IMPORT used: real time 0.21 seconds cpu time 0.09 seconds

There is no underlining in the program regarding the error. Appreciate if someone can help.

Thanks,

Atal


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