?
Solved

Naming a variable with embedded blanks in SAS

Posted on 2014-10-21
2
Medium Priority
?
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
ShannonEE earned 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

777 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