when I define a numeric variable (or attrib) in a dataset, since the variable would only have value in the range of 1-9000K, so I would like to define the length of variable to be 4 (bytes). based on rule in other database ststem, a 4 bytes integer should be able to handle max value of 2147483647. However, when try to insert a value greater than 2500k, it starts having the round off error, SAS does not complian the overflow (no warning or error) but just insert it with round off error.
I am trying to understand how sas stores the numeric value with different length and how to calculate the safe data range for a specified length? Also is there a way to add a check constrain to let SAS to spit an error when overflow happens?
I am new to SAS, any suggestion would be high appreciated.