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;
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
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;
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
Thank you!! It is working now.
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:
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
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!
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.
Ready to level-up your skills? Choose your own adventure.