Learning SAS? Welcome to the exclusive online community for all SAS learners.

Why SAS does not reflect -0 in dataset?

Reply
Occasional Contributor
Posts: 9

Why SAS does not reflect -0 in dataset?

Hi,

I have created one sas dataset. it's having -0 value.

DATA .LLR_AMT;

LENGTH LLR_AMT 8.;

LLR_AMT=0.0;

OUTPUT;

LLR_AMT=0;

OUTPUT;

LLR_AMT=-0.0000;

OUTPUT;

LLR_AMT=-0.0;

OUTPUT;

LLR_AMT=0.00000;

OUTPUT;

RUN;

But when I see the output it comes like below.

OUTPUT:

LLR_AMT:

0

0

0

0

0

But when I used a different ETL tool TALEND it shows me same value as input data.

Can anyone help me to understand why SAS is not reflecting correct value?

Super User
Super User
Posts: 7,401

Re: Why SAS does not reflect -0 in dataset?

Well, here is an article created by Chris from these forums which discuss this: http://blogs.sas.com/content/sasdummy/2011/12/14/all-about-negative-zero/

Personally I don't see why it would matter except in very rare circumstances. 

Ask a Question
Discussion stats
  • 1 reply
  • 202 views
  • 0 likes
  • 2 in conversation