Help using Base SAS procedures

SAS data set to an ASCII file

Accepted Solution Solved
Reply
Super Contributor
Posts: 400
Accepted Solution

SAS data set to an ASCII file

Is it possible to convert as sas data file (.sas7bdat) to an ascii file?  We have data and a user is unable to use sas and needs the data in an ascii format.

I've never had to do this before and i'm unsure of where to start.  Any help would be greatly appreciated.


Accepted Solutions
Solution
‎04-23-2012 02:29 PM
Respected Advisor
Posts: 3,156

Re: SAS data set to an ASCII file

Posted in reply to jerry898969

Hi,

if you just have one file to convert, menu-driven would be the simplest. just double click the SAS table to open it up, then go to file -> export data , and follow through the steps.

If you want it automated done (probably with macros to deal with multiple files or reoccurring scenarios ) , then here is an example copied from Help doc to start with:

proc export data=sashelp.class

  outfile='c:\myfiles\class'

  dbms=dlm;

  delimiter='&';

run;

You can choose whatever delimiter, if you don't, the default is blank.

Haikuo

View solution in original post


All Replies
Solution
‎04-23-2012 02:29 PM
Respected Advisor
Posts: 3,156

Re: SAS data set to an ASCII file

Posted in reply to jerry898969

Hi,

if you just have one file to convert, menu-driven would be the simplest. just double click the SAS table to open it up, then go to file -> export data , and follow through the steps.

If you want it automated done (probably with macros to deal with multiple files or reoccurring scenarios ) , then here is an example copied from Help doc to start with:

proc export data=sashelp.class

  outfile='c:\myfiles\class'

  dbms=dlm;

  delimiter='&';

run;

You can choose whatever delimiter, if you don't, the default is blank.

Haikuo

Super Contributor
Posts: 400

Re: SAS data set to an ASCII file

Thank you so much that did what I needed.  Thanks

🔒 This topic is solved and locked.

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

Discussion stats
  • 2 replies
  • 1256 views
  • 0 likes
  • 2 in conversation