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

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


SAS 1.JPGSAS 2.JPG
1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

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

View solution in original post

7 REPLIES 7
trekvana
Calcite | Level 5

use the heading=vertical option;

proc print data=xxxxx heading=vertical; run;

Cynthia_sas
SAS Super FREQ

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

Doc_Duke
Rhodochrosite | Level 12

Actually, I think that it is

heading=horizontal.

Either way, you can see how to do it in the PROC PRINT documentation.

trekvana
Calcite | Level 5

Doc- you are right. i thought mediaeval wanted the text to go from horizontal to vertical

art297
Opal | Level 21

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

mediaeval
Calcite | Level 5

Thanks, everyone - I can't believe the solution is so simple! This has plagued me for ages Smiley Happy

Doc_Duke
Rhodochrosite | Level 12

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.)

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

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
  • 7 replies
  • 2403 views
  • 0 likes
  • 5 in conversation