07-26-2011 10:53 AM
Wonder if you can help. I'm writing some code to check whether an IP address is within a range of IP addresses.
I have used the following code, however I rekon that the reference to counter "i" is not being resolved and is been taken as a literal i.
the IP address within the table is a string variable not numeric.
do i = 97 to 126;
If originatingIPad = 'xx.xxx.xx.&i.' then keep=1;
Thanks in advance for any assistance offered.
07-26-2011 11:42 AM
Do you need to test each value? If you convert to numeric you can test using a range.
where 96 le input(scan(ip,-1,'.'),f3.) le 126;
07-26-2011 12:47 PM
I'm glad we were able to help but, the more I think about it, aren't you really going to need something like:
length originatingIPad $16;
Need further help from the community? Please ask a new question.