Hi All,
Does it possible to export the sas dataset in .txt (text format) by using SAS ODS ?
Thank you in advance !!!
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.
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.
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.
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.
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,
ODS stands for output delivery system. It is mostly used to format the output data of a SAS program to nice reports which are good to look at and understand. That also helps sharing the output with other platforms and soft wares.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.