You can ask SAS to show you the largest integer it can store as a number before it you start seeing collisions of two or more integers to the same number.
1757 data _null_;
1758 big=constant('exactint');
1759 put big :comma24.;
1760 run;
9,007,199,254,740,992
Any numbers longer than that you should store as character strings instead.
data demo1;
input @1 String $21. @1 number ;
put '_INFILE_: ' _infile_ :21.
/ 'STRING : ' string
/ 'NUMBER : ' number 21.
/
;
CARDS;
123456789012345678901
111111111111111111111
222222222222222222222
;
_INFILE_: 123456789012345678901
STRING : 123456789012345678901
NUMBER : 123456789012345683968
_INFILE_: 111111111111111111111
STRING : 111111111111111111111
NUMBER : 111111111111111114752
_INFILE_: 222222222222222222222
STRING : 222222222222222222222
NUMBER : 222222222222222229504
If you are reading your data from a text file, like a CSV file, then make sure to define the variable has character when you read it.
If you are getting these values from an external database then have the database cast the value as a string before sending it to SAS.
... View more