Occasionally, when I use Proc Print, it will display the variable names in the Output Window as per the attached diagram, SAS 1.jpg. I find this difficult to read. Is there an option in SAS which will force the variable names to always output to the window as per the second diagram, SAS 2.jpg? I have looked for information online but can find nothing.
TIA
Based on the other responses, the OP will discover which one they really want. However, since the OP wanted it to always look like the SAS2.jpg example, I vote for heading=horizontal
use the heading=vertical option;
proc print data=xxxxx heading=vertical; run;
Hi:
To clarify:
HEADING=VERTICAL will always produce vertical headings, one character per line (as shown in SAS 1.jpg)
HEADING=HORIZONTAL should always produce horizontal headings, as shown in SAS 2.jpg.
Here's the doc:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002291718.htm
With horizontal headings, all your columns might not fit in the LINESIZE for the listing window. Possible workarounds are:
1) For LISTING output, increase the LINESIZE option to the maximum (options linesize=256;)
2) For LISTING output, turn off centering to give maximum space (options linesize=256 nocenter;)
3) switch to ODS HTML output, which can be as wide as it needs to be (instead of using LISTING destination output)
4) if you do not want to switch to HTML output, then for LISTING output control the split of the column headers with the SPLIT= option in PROC PRINT and a LABEL statement that uses the SPLIT character (as described in the above documentation link).
cynthia
Actually, I think that it is
heading=horizontal.
Either way, you can see how to do it in the PROC PRINT documentation.
Doc- you are right. i thought mediaeval wanted the text to go from horizontal to vertical
Based on the other responses, the OP will discover which one they really want. However, since the OP wanted it to always look like the SAS2.jpg example, I vote for heading=horizontal
Thanks, everyone - I can't believe the solution is so simple! This has plagued me for ages
Even though I have used SAS for >30 years, I still find myself going back to the documentation. One thing that has been nice in the newest version of the Enterprise Guide program editor is that it has a syntax completion function. It doesn't tell me what the option does, but it makes me aware of the presence of the option. (F1 goes to the context sensitive help.)
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!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.