SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

All of my data shows up in only one column

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

All of my data shows up in only one column

I uploaded this txt file and the output data displays everything in only one column. How do I get it show the data in the seperate columns. Here's the code I used and attached are screenshots.

 

/* Generated Code (IMPORT) */
/* Source File: hbat tabs.txt */
/* Source Path: /home/tmaciver7840/my_content */
/* Code generated on: Friday, June 24, 2016 3:03:23 PM */

%web_drop_table(WORK.IMPORT3);


FILENAME REFFILE "/home/tmaciver7840/my_content/hbat tabs.txt" TERMSTR=CR;

PROC IMPORT DATAFILE=REFFILE
DBMS=DLM
OUT=WORK.IMPORT3;
GETNAMES=YES;
RUN;

PROC CONTENTS DATA=WORK.IMPORT3; RUN;


%web_open_table(WORK.IMPORT3);


Screen Shot 2016-06-24 at 11.12.19 AM.pngScreen Shot 2016-06-24 at 11.11.59 AM.png

Accepted Solutions
Solution
‎06-24-2016 11:30 AM
SAS Super FREQ
Posts: 708

Re: All of my data shows up in only one column

Posted in reply to Tommac72584

Hi

 

From the name of the file and how it behaves, I assume you have a tab delimited file. So your Proc IMPORT code should say DBMS=TAB

 

proc import
  out=work.book
  datafile="c:\temp\book1_tab.txt"
  dbms=tab
  replace
;
  getnames=yes;
run;

Bruno

View solution in original post


All Replies
Solution
‎06-24-2016 11:30 AM
SAS Super FREQ
Posts: 708

Re: All of my data shows up in only one column

Posted in reply to Tommac72584

Hi

 

From the name of the file and how it behaves, I assume you have a tab delimited file. So your Proc IMPORT code should say DBMS=TAB

 

proc import
  out=work.book
  datafile="c:\temp\book1_tab.txt"
  dbms=tab
  replace
;
  getnames=yes;
run;

Bruno

Occasional Contributor
Posts: 9

Re: All of my data shows up in only one column

Posted in reply to Bruno_SAS
Yes it is a tab delimited. This fixed it. Thank you Bruno!
☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 325 views
  • 1 like
  • 2 in conversation