I am getting a problem related to the value rounding off while loading the data to DB2 table from SAS Dataset using PROC APPEND.
A 16 digit numeric field which contains value for e.g. as 8853159845301049 in SAS data set gets rounded off to 8853159845301050 while populating in DB2 using proc append in the table loader.
The metadata for a field in SAS Dataset is -
Type - Numeric
Length - 8
Format - 16.
Informat - 16.
The metadata for a field in DB2 is -
Type - DECIMAL
Precision - 16
Scale - 0
Please suggest the way by which this issue can be prevented.
I remember that there is a very good SAS whitepaper or SUGI/SEUGI paper explaining why this can happen - but I just can't find it anymore!!!
What I remember from this paper is that the cause of the problem is how numbers are digitally represented/stored in SAS vs. Oracle (or DB2) - and also under different platforms like Windows/Unix/zOS. It was very clear and obvious.
I believe the solution was using the round() function when loading to Oracle - but I'm just no more able to recall the details.
Let me know in case you find this paper. It's one I should store in "my box".
Just found this SAS note which points in the same direction. "endian byte order" seems to be a key word.
Message was edited by: Patrick