BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Dingdang
Fluorite | Level 6

Hi,

I know there are already a lot of old posts to this question. I read them through but I still cannot solve my problem.

I have an excel table with more than 255 columns. that is why i saved the excel data to a .txt data with tab-delimited values. and then i used the following code to read it into SAS:

PROC IMPORT OUT=libl.texttest

DATAFILE="R:\Test\myfile.txt";

DBMS=DLM REPLACE;

GETNAMES=YES;

DELIMITER='09'x;

SCANTEXT=YES;

RUN;

when i look at the log, it shows error 180-322.

can someone help me solve this problem or give me a hint, how it came out like this? I am very grateful for that.

BR  Dingdang

1 ACCEPTED SOLUTION

Accepted Solutions
AJPeters
Calcite | Level 5

It looks like you've got an extra semi-colon in the import, after the datafile spec.

PROC IMPORT OUT=libl.texttest

DATAFILE="R:\Test\myfile.txt";  * <~~~ Remove this semi-colon;

DBMS=DLM REPLACE;

GETNAMES=YES;

DELIMITER='09'x;

SCANTEXT=YES;

RUN;

View solution in original post

4 REPLIES 4
brsinco
Calcite | Level 5

Hi Dingdang,

Try delimiter=tab. 

Hope this helps.

Brandy

Dingdang
Fluorite | Level 6

hi Brandy,

thanks for your quick help. just tried it but still i got the same error message error 180 Smiley Sad

BR  Dingdang

AJPeters
Calcite | Level 5

It looks like you've got an extra semi-colon in the import, after the datafile spec.

PROC IMPORT OUT=libl.texttest

DATAFILE="R:\Test\myfile.txt";  * <~~~ Remove this semi-colon;

DBMS=DLM REPLACE;

GETNAMES=YES;

DELIMITER='09'x;

SCANTEXT=YES;

RUN;

Dingdang
Fluorite | Level 6

hi AJPeters,

thanks, that was one of the errors that i made. In addition i deleted the row "SCANTEXT=YES" and then it worked well.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 909 views
  • 0 likes
  • 3 in conversation