03-31-2014 01:16 PM
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;
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.
03-31-2014 01:20 PM
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.
03-31-2014 01:26 PM
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:
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.
03-31-2014 02:00 PM
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.