The SAS Output Delivery System and reporting techniques

SAS ODS

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

SAS ODS

Hi All,

 

Does it possible to export the sas dataset in .txt (text format) by using SAS ODS ?

 

Thank you in advance !!!

 


Accepted Solutions
Solution
‎10-17-2017 06:33 AM
Super User
Posts: 22,823

Re: SAS ODS

Posted in reply to singhsahab

ODS CSV will create a CSV file. 

ODS LISTING, the original SAS output can also be directed to a text file. 

A data _null_ step can create text files. 

 

Proc Export can create txt files as well. 

 

Note that you’ll lose graphs in a text file. 

View solution in original post


All Replies
Solution
‎10-17-2017 06:33 AM
Super User
Posts: 22,823

Re: SAS ODS

Posted in reply to singhsahab

ODS CSV will create a CSV file. 

ODS LISTING, the original SAS output can also be directed to a text file. 

A data _null_ step can create text files. 

 

Proc Export can create txt files as well. 

 

Note that you’ll lose graphs in a text file. 

Super User
Super User
Posts: 9,193

Re: SAS ODS

Posted in reply to singhsahab

Nope.  ODS is the destinations for output, it is not an output procedure in itself.  For that you would need to generate output, generally using output procedures such as proc report, print, tabulate, data step.  You can also select various objects from certain procedures, and proc sql without a create table automatically creates some output, but generally ods target set and then proc your data out to that destination.

Super User
Posts: 13,008

Re: SAS ODS

Posted in reply to singhsahab

I don't really believe there is any actual "standard" TXT file format. Some "text" files use tab characters for delimiters, others don't. Some are fixed column.

So ODS would tend to have a bit of a moving target.

You may want to provide a short example of some example data and what you want your "text" file to look like so we can make specific suggestions.

Occasional Contributor
Posts: 12

Re: SAS ODS

Hi Ballaardw

 

thank you for your post .However this can be achieve by ODS LISTING . Below mentation code works for me.

 

ODS NORESULTS;

ODS LISTING FILE "FILE.TXT";

PROC PRINT DATA=TEST;

RUN;

ODS LISTING CLOSE;

 

Thanks,

 

 

☑ This topic is solved.

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

Discussion stats
  • 4 replies
  • 401 views
  • 2 likes
  • 4 in conversation