Help using Base SAS procedures

Export to notepad

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Export to notepad

I have a few data sets that I have merged together and manipulated with PROC REPORT. I am struggling with two things

  • I can't seem to figure out how to get a 0 input for missing/blank data
  • I need to export this data into notepad as a txt file

Any help/hints would be great!

Thanks


Accepted Solutions
Solution
‎10-22-2014 09:03 PM
Super User
Posts: 3,102

Re: Export to notepad

options missing = '0'; ?

View solution in original post


All Replies
Solution
‎10-22-2014 09:03 PM
Super User
Posts: 3,102

Re: Export to notepad

options missing = '0'; ?

New Contributor
Posts: 2

Re: Export to notepad

Thanks! That worked like a charm! 

SAS Super FREQ
Posts: 8,743

Re: Export to notepad

Hi:

  When you say that you "need to export this data into notepad as a txt file", do you mean you need to export ONLY the data or you need a PROC REPORT type report in a TEXT file. You can simply use ODS LISTING FILE= if you want the PROC REPORT output in Notepad/TXT file, however, this will send your SAS titles to the TXT file too. Something like the program below. Otherwise, you could do something with a DATA Step program.

Cynthia

ods _all_ close;

ods listing file='c:\temp\myreport.txt';

options nodate number pageno=1;

 

proc report data=sashelp.class ls=80 ps=60;

title 'This is the Title';

column name sex age height weight;

define name / order;

define sex / display f=$3.;

define age / display;

define height / display;

define weight / display;

run;

ods listing close;


save_report_as_txt.png
☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 228 views
  • 0 likes
  • 3 in conversation