@kristiepauly wrote:
Thanks for that explanation @ballardw.
I initially used label statements, and it was working but in trying to fix some other code I came across some old notes that said to NOT use label statements as it would likely cause problems downs the road. It said the preferred method is the rename statement. From all the comments on this thread, instructing me to use the label statement, it sounds like that isn't true? Is there a reason to use one over the other or just user preference?
I would have to see a complete discussion of exactly what was said in this regard. Most likely it would have involved moving the data from SAS to another data system as most do not have any concept of "label" and so labels would not automagically transfer to another data system. The ability of SAS to handle the name literals was basically added to handle names from other data systems that have much looser rules for things like spaces, and characters such as *()[] and so on as part of the SAS Access to different external databases. If you need to transfer the results to another data and "rename" seems desirable I would say wait until the actual step that transfers the data.
Maybe by that time you'll have enough experience to write renames that are syntactically correct.
If you are going to write models, summaries, reports, do analysis and/or graphs inside SAS then Labels are much more flexible.
... View more