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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 659 views
  • 1 like
  • 2 in conversation