BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

I export a big SAS data set into txt file.

The txt file is with columns headers.

In the future I need to use this txt file and then I need to import it into SAS.

The problem is that when Iimport it then the header columns is in the rows of data instead of in the headers row.

What is the way to solve it?

proc export data=tbl1
outfile="/path/Revenue.txt"
dbms=tab replace;
run;


/*Import into SAS when need it*/
data Revenue; 
infile   "/path/Revenue.txt"
        dlm='09'X dsd truncover;
input ID
     branch
	  partition1 :$400.
	 partition2 :$400.
	  partition3 :$50.
	  SOURCE :$50.
 	  revenue	;
run;
1 REPLY 1

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 584 views
  • 1 like
  • 2 in conversation