SAS is only going to use 8 bytes to store numerics, so there will be a limit to what SAS can consider to be infinite. Here is a sample program to illustrate an approach:
data _null_;
x = 1234567890123456789;
y = x + 1;
if x = y then put 'Match';
run;
The program writes "Match", because the values of x and y are too large to store exactly in 8 bytes. So this might be one version of "infinite" in the SAS world:
if int(var) = int(var) + 1 then do;
Good luck.