BookmarkSubscribeRSS Feed
kondapalli
Calcite | Level 5

HI,

 

Please let me know how to convert the software settings from HTML to listing.

2 REPLIES 2
alexal
SAS Employee

@kondapalli,

 

By default SAS Studio does not actually create listing output. SAS Studio uses ODS behind the scenes to initially create HTML output but also gives you the option of saving your output in RTF and PDF formats as well. But if desired, you can still create listing output in SAS Studio and save this listing output to a file. Here are a few options for you...

 

One option is to wrap ODS Listing statements around your code (using the FILE= option on the initial ODS Listing statement to tell SAS where to writes its listing output to). Here is a simple example...

 

ods listing file='/tmp/sasstudio.lst';
title1 'Output from SAS Studio';
proc print data=sashelp.class;
run;
ods listing close;

 

Another option is to use PROC PRINTTO, such as:

 

proc printto new print='/tmp/sasstudio1.lst'; run;
title1 'More output from SAS Studio';
proc print data=sashelp.class; run;
proc printto; run;

 

 

Via SAS code in SAS Studio, you can redirect the log to a file using a PROC PRINTTO step at the top of your code similar to:

proc printto new log="/tmp/sasstudio.log";run;

And then to close the log, at the end of your code, use:

proc printto; run;

But, as currently designed, when you use PROC PRINTTO as shown above, while this step does write the log to a file, at the same time it prevents SAS Studio from displaying the log information in the SAS Studio log window. There is currently not a way to use PROC PRINTTO with the log option and have it do both. But you will see the same behavior with both SAS and SAS Studio.

Reeza
Super User

I suspect your asking this because you're using some reference material that has the listing output. I would strongly recommend you stick with HTML because it's pretty much the new standard. Listing is usually faster, but writing to an external file that you have to open separately is probably longer. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1616 views
  • 2 likes
  • 3 in conversation