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

I am using SAS University Edition to print reports using proc report procedure. However few options are not working. For eg I want to generate double overline and underline but it is not displaying my report as required. I am attaching my code for the reference.

proc report data=sashelp.class nowindows headline headskip;
columns name age sex height weight ratio;
define sex/"Gender" display width=8;
define age/"Age" display width=10;
define name/"Name" display width=10;
define height/analysis mean 'Height' format=8.2;
define weight/analysis mean 'Weight' format=8.2;
define ratio/computed format=6.2;
compute ratio;
ratio=height.mean/weight.mean;
endcompute;
rbreak after/summarize dol dul;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  They may need to use FILE= with ODS LISTING in SAS Univ Edition and SAS OnDemand for Academics because there is no default Output window to view the text file.

 

**SAS University Edition in a Virtual Machine;
ods listing file='/folders/myfolders/myodslist.txt';

**proc report code;

ods listing close;

 

**SAS OnDemand for Academics;
ods listing file='/home/<UserID>/myodslist.txt';

**proc report code;

ods listing close;

 

If using the above to get "LISTING" look and feel to the code, then other options like Linesize and Pagesize will also come into play.

 

Hope this helps,

Cynthia

 

View solution in original post

5 REPLIES 5
SASKiwi
PROC Star

Those two options only work if you are using the ODS LISTING style of output. By default SAS Studio uses ODS HTML. The restrictions are explained here: https://documentation.sas.com/?docsetId=proc&docsetTarget=p1o6lvfc7oqzwhn1nehvw4htp3j5.htm&docsetVer...

 

If you want to continue using these options wrap your code like so:

ods listing;

<proc report code>

ods listing close;
Cynthia_sas
SAS Super FREQ

Hi:

  They may need to use FILE= with ODS LISTING in SAS Univ Edition and SAS OnDemand for Academics because there is no default Output window to view the text file.

 

**SAS University Edition in a Virtual Machine;
ods listing file='/folders/myfolders/myodslist.txt';

**proc report code;

ods listing close;

 

**SAS OnDemand for Academics;
ods listing file='/home/<UserID>/myodslist.txt';

**proc report code;

ods listing close;

 

If using the above to get "LISTING" look and feel to the code, then other options like Linesize and Pagesize will also come into play.

 

Hope this helps,

Cynthia

 

Fabeeha
Fluorite | Level 6

Thank you!! It is working now. 

Fabeeha
Fluorite | Level 6
Tried the same code with ods listing. Still not getting the required output.
Cynthia_sas
SAS Super FREQ

Hi:

  This code worked for me on my local install of SAS running 9.4M5 and also worked on my SAS Studio on a server using 9.4M6:

 

dol_dul_listing.png

 

Output file myodslist.txt opened in Notepad shown above. I always use FORMCHAR with LISTING output and explicitly set LINESIZE and PAGESIZE, as shown in the OPTIONS statement. Remember in SAS Studio to right click on the TXT file and select View File as Text -- otherwise, SAS Studio makes you HTML by default and does NOT show you the TXT file. You have to find the output and view it.

 

Cynthia

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1319 views
  • 4 likes
  • 3 in conversation