Help using Base SAS procedures

PROC EXPORT file .txt

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

PROC EXPORT file .txt

When I export txt file whit PROC EXPORT

PROC EXPORT DATA= RATA_0_TXT
OUTFILE= "P:\Risk Management\MORTGAGE\...............txt"
DBMS=TAB REPLACE;
RUN;

I wouldn’t write the column's name .
How can I do?

Thanks in advance

Accepted Solutions
Solution
‎12-16-2016 01:31 PM
Super User
Posts: 9,681

Re: PROC EXPORT file .txt

[ Edited ]

Editor’s Note: This is a popular topic. Thanks to @Ksharp for providing the solution below. The following SAS Note shows how to control variable names when using PROC EXPORT with a comma, tab or delimited file:

   

Usage Note 41735

 

 

Hi.
How about this:


[pre]
proc export data=sashelp.class outfile='c:\class.txt' dbms=tab replace;
putnames=no;
run;
[/pre]


Ksharp

View solution in original post


All Replies
SAS Super FREQ
Posts: 8,743

Re: PROC EXPORT file .txt

Hi:
There have been many previous forum postings on this topic. If you use the forum's search facility you should be able to find some of those previous solutions.

cynthia
Solution
‎12-16-2016 01:31 PM
Super User
Posts: 9,681

Re: PROC EXPORT file .txt

[ Edited ]

Editor’s Note: This is a popular topic. Thanks to @Ksharp for providing the solution below. The following SAS Note shows how to control variable names when using PROC EXPORT with a comma, tab or delimited file:

   

Usage Note 41735

 

 

Hi.
How about this:


[pre]
proc export data=sashelp.class outfile='c:\class.txt' dbms=tab replace;
putnames=no;
run;
[/pre]


Ksharp

Occasional Contributor
Posts: 7

Re: PROC EXPORT file .txt

The option putnames=no don't run.
I read previous forum posting.

In the end I use

data _null_;
set db ;
file "P:\Risk Management\MORTGAGE\.........";
put (_all_) (Smiley Happy;run;


Thanks !!
Super User
Posts: 9,681

Re: PROC EXPORT file .txt

Do you test it by yourself.
I test it successfully in my SAS 9.2


Ksharp
☑ This topic is SOLVED.

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

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