05-02-2013 07:24 PM
I used the following code to rename a variable. Why original name come up under 'Label' when using Proc Contents (i.e., variable name becomes uncon and Label is allreq.
What is a label used for?
05-02-2013 08:11 PM
because the label isn't the variable name automatically. You need to change it as well.
Variable names and labels aren't tied to the same thing, which is nice in some circumstances and annoying in others.
05-03-2013 07:35 AM
If you do not explicitly set the variable label, then the variable name is used. So in that case whern the variable is renamed, the label should change. However, when you explicitly set the label for the variable (using a label statement) it is unchanged by a rename.
05-03-2013 11:48 AM
3 things to know:
1. attrib _all_ label=''; removes all labels
2. vlabel will get the name of the label
3. label var="my_label" sets a label
They're not very complex. I wish there was a way to set labels more easily, but that's about it.
You can always search google : variable label site:lexjansen.com to see what else there is.