Desktop productivity for business analysts and programmers

Is variable _NUMERIC_ still available for SAS EG 7.1 ?

Reply
New User Elf
New User
Posts: 1

Is variable _NUMERIC_ still available for SAS EG 7.1 ?

Hello, Everyone,

 

 

I try to use _NUMERIC_ to change the output format of all numeric variables to avoid scientific notation. However, the code below doesn't work.

 

 

code.PNG

The result is: 

result.PNG

 

Thanks for your help.

Super User
Posts: 6,921

Re: Is variable _NUMERIC_ still available for SAS EG 7.1 ?

Just a few points to consider ...

 

If you are not going to use scientific notation, just how are you going to express 1345567 in only 4 characters?

 

_NUMERIC_ is still part of the software, however its meaning is mildly tricky when used in a DATA step.  There, it means "all the numeric variables that have been defined so far".  Since you put the FORMAT _NUMERIC_ statement before the SET statement, no numeric variables have been defined at that point.  So the FORMAT statement has no impact.  If you move it to after the SET statement, you will see a difference.

Super User
Posts: 13,913

Re: Is variable _NUMERIC_ still available for SAS EG 7.1 ?

Please post code in a code box opened using the forum {i} menu icon.

if we want to test some code it is much easier for us to copy it from the code box instead of having to completely retype code posted as a picture. If your example code runs more than a very few lines I doubt many of the users here will bother to retype it to test.

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