BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Using the label option in proc print seems easy enough but my attempts to do so silently fail (no error message in the log). The code is basically this:

proc print data=peopletolist n noobs;
title'participants with incomplete records';
var lname fname id_num region ispo_cd group;
label lname='Last Name'
fname='First Name'
id_num='ISP Number'
region='Region'
ispo_cd='Officer'
group='Status';
run;

Output does not use the specified label for each column but instead keeps using the name of the variable as the column header. Why?
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
This is the documented behavior. As is says here:
http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001292467.htm

By default, SAS uses variable names for column headings.


Even if you have a LABEL statement in your PROC PRINT step, you must -turn on- the use of those labels with the LABEL option (or with the SPLIT= option, which requires the use of the variable labels).

See the specific documentation here:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002291718.htm#a003186152 (LABEL)http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002291718.htm#a003186154 (SPLIT)

cynthia
deleted_user
Not applicable
> Even if you have a LABEL statement in your PROC PRINT
> step, you must -turn on- the use of those labels with
> the LABEL option (or with the SPLIT= option, which
> requires the use of the variable labels).

Thank you, that was very helpful.
The docs I was working from did not make that clear.

Thanks.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 529 views
  • 0 likes
  • 2 in conversation