BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jz127323
Obsidian | Level 7

Hi,

 

I'm using web-based SAS Studio. When I'm running the program on the book of 'Learning SAS by Example: A Programmer's Guide, Second Edition', I have the different results. The headline and flow options seem not functionary. Can anyone advise what the problem is?

 

The program:

jz127323_2-1632239767651.png

The should-be report (from the book):

jz127323_1-1632239716043.png

 

My result:

jz127323_3-1632239853192.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ
Hi:
The difference in your output is due to the fact that PROC REPORT has some options that are LISTING only options. The plain output that is shown in the book is LISTING output. Nearly all of the LISTING only options are ignored by ODS (Output Delivery System) destinations like HTML, RTF and PDF. Options like HEADLINE, HEADSKIP, FLOW, to name just a few, are NOT used by ODS. When you are using SAS Studio, the web-based editor, the default output is HTML, which is why you see differences. My guess is that you're using an older version of the book. I thought the book had been updated to show ODS output. At any rate, there's not any editor interface that produces LISTING output by default anymore. If you want to generate LISTING output, you'd need to take control of the output and generate a text file.

ods listing file='~/mylisting.txt';
*** your SAS code ***;
ods listing close;

But honestly, I'd skip it and get used to generating HTML, RTF or PDF output. None of my students use LISTING anymore with PROC REPORT.

Cynthia

View solution in original post

4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
The difference in your output is due to the fact that PROC REPORT has some options that are LISTING only options. The plain output that is shown in the book is LISTING output. Nearly all of the LISTING only options are ignored by ODS (Output Delivery System) destinations like HTML, RTF and PDF. Options like HEADLINE, HEADSKIP, FLOW, to name just a few, are NOT used by ODS. When you are using SAS Studio, the web-based editor, the default output is HTML, which is why you see differences. My guess is that you're using an older version of the book. I thought the book had been updated to show ODS output. At any rate, there's not any editor interface that produces LISTING output by default anymore. If you want to generate LISTING output, you'd need to take control of the output and generate a text file.

ods listing file='~/mylisting.txt';
*** your SAS code ***;
ods listing close;

But honestly, I'd skip it and get used to generating HTML, RTF or PDF output. None of my students use LISTING anymore with PROC REPORT.

Cynthia
jz127323
Obsidian | Level 7
Hi Cynthia,

Thank you so much!

James
Reeza
Super User

You're using an older tutorial on newer software so you cannot expect it to align exactly. 

 

First, the version you're training uses LISTING as the default output, which has not been true for over a decade. HTML is the default output now. 

 

If you check the FLOW option in the documentation it explicitly states it ONLY applies to ODS LISTING not to any other destination, so you will not see the same behaviour in your HTML files. HEADLINE has the same limitation noted in the documentation. 

 

If you want to see the effect, write your output to a listing file and check the file or try and find a newer tutorial that works with SAS Studio and HTML.

 

ods listing file='/home/jz127323/mydemoFile.txt';

proc reprot code goes here;



ods listing close;

 


@jz127323 wrote:

Hi,

 

I'm using web-based SAS Studio. When I'm running the program on the book of 'Learning SAS by Example: A Programmer's Guide, Second Edition', I have the different results. The headline and flow options seem not functionary. Can anyone advise what the problem is?

 

The program:

jz127323_2-1632239767651.png

The should-be report (from the book):

jz127323_1-1632239716043.png

 

My result:

jz127323_3-1632239853192.png

 


 

 

 

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 4 replies
  • 840 views
  • 8 likes
  • 3 in conversation