Solved

Naming a variable with embedded blanks in SAS

Posted on 2014-10-21
2
243 Views
Last Modified: 2016-02-13
Experts,

I have a variable that I would like to  rename to output to Excel with embedded blanks.  Is there a way to do this?

ie    "Prov_Num "   to  "Provider Number"
0
Comment
Question by:morinia
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
ShannonEE earned 500 total points
ID: 40395767
Variables with embedded blanks and other weird characters are allowed in sas by using the N suffix after the variable name in quotes.

For example to rename   Prov_Num   to  "Provider Number"  in SAS dataset  temp.results  you could run a job similar to this

data results(rename=(Prov_Num = 'Provider Number'n Cust_Num='Customer Number'n));
    set results;
run;

Open in new window


However when you create the variable in your previous work, you could have done exactly what you previously did, except everywhere you defined and used Prov_Num you now specify 'Provider Number'n

Ian
0
 
LVL 8

Expert Comment

by:ShannonEE
ID: 40395771
Hi there morinia,

In addition to the above, I must caution you strongly that ms excel is an excellent piece of software to help you make mistakes.  This warning is over and above the warning that excel has a host of errors, some documented by ms and others ignored by ms.

Ian
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question