DATA Step, Macro, Functions and more

Character data in Numaric variable.

Reply
Super Contributor
Posts: 276

Character data in Numaric variable.

Hi all..

Is it possible to enter a text in a numaric variable with out changing that variable into character variable???

Regular Contributor
Posts: 151

Character data in Numaric variable.

There are 2 ways I can think of to have text showing in a numeric field.

  1. Formatted value, you can create a format to display the number as text
  2. Special missing values (.A - .Z and ._).
Occasional Contributor
Posts: 10

Character data in Numaric variable.

Hi,

no, this isn't possible.

If you want to combine a numeric value with a text, you have to generate a second (character) variable.

For example:

data test;

   length b $ 20;

   a=1; 

   b=cats(a,'test');

   run;

proc fsview; run;

Hope, this helps.

Ask a Question
Discussion stats
  • 2 replies
  • 232 views
  • 0 likes
  • 3 in conversation