DATA Step, Macro, Functions and more

Different results in local vs. remote submitted calculations.

Reply
Contributor
Posts: 29

Different results in local vs. remote submitted calculations.

Hi,

I'm trying to optimise some SAS code and part of this involves submitting it to a server which will run it faster.

I'm having an issue though when using proc compare to confirm that I am still getting the same results.

Here's an example from the proc compare output;

obs     set1          set2     difference

19922     -0.0400      -0.0400      6.939E-18

Both of the values appear the same but SAS is saying that there is a minute difference between the two values.

I've looked at the options both locally and on the server and I think that it has something to do with these two variables;

locally;

SYSSIZEOFLONG 4

SYSMAXLONG 2147483647


server;

SYSSIZEOFLONG 8

SYSMAXLONG 9007199254740992



Would anyone be able to tell me if I'm heading in the right direction with this or be able to offer a solution?


Thanks in advance for any help.


Super User
Posts: 17,750

Re: Different results in local vs. remote submitted calculations.

Is that a significant difference to you?

Look at the fuzz option in proc compare.

Super User
Super User
Posts: 6,497

Re: Different results in local vs. remote submitted calculations.

Looks like the difference is within rounding error.  Things to check are

1) Make sure you are using LENGTH=8 for this variable so that SAS is not truncating the values when it writes it to disk.

2) Are the two systems using the same floating point representation? For example if the remote is an IBM mainframe then it will store floating point numbers differently than a Windows machine.

Super User
Posts: 5,254

Re: Different results in local vs. remote submitted calculations.

Assuming that the server and the client is different OS and/or bit (32/64), yes, there could be tiny differences.

But print out your difference in decimals:

0.00000000000000006939

I don't know what kind of data you have, but unless you are nuclear scientist or something similar, you could probably live with this difference.

TS-DOC: TS-230 - Dealing with Numeric Representation Error in SAS Applications

http://support.sas.com/techsup/technote/ts654.pdf

http://support.sas.com/resources/papers/proceedings11/275-2011.pdf

Data never sleeps
Valued Guide
Posts: 3,208

Re: Different results in local vs. remote submitted calculations.

The syssizeoflong is new at 9.3. SAS(R) 9.3 Macro Language: Reference (what is new)

SAS(R) 9.3 Companion for UNIX Environments servers are mostly installed at 64-bit and your desktop still at 32-bit. That is the difference.

Linus has already referred to the floating point details, that is the reason for this normal differences.

Reez has given the Fuzz option with compare als this behavior is known but  should be managed with knowledge on how to.
case solved.....   

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 4 replies
  • 249 views
  • 0 likes
  • 5 in conversation