Well, you could start here to identify some that are in the UK. That list will be smaller than the list of other values.
IF you can narrow it down a certain set of values, then you can use SELECT IF with ANY to include just those.
For example, let's say you know that UK IPs can only start with 128, 127, or 145, then you do say:
compute #d=char.index(ip_address,".").
compute ip1=number(char.substr(ip_address,1,#d-1),F3).
select if any(ip1,128,127,145).
execute.
The list of values inside ANY() can be of arbitrary length. The trick of course is knowing the values to include. Maybe the site I gave you is exhaustive; I don't know. This is the only way I can think of off the top of my head to do it.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
------------------------------
Original Message:
Sent: Thu March 09, 2023 05:32 AM
From: Julie Selwyn
Subject: How to remove unwanted IP addresses
HI I have a large survey dataset in SPSSv27. Does anyone know how to identify and remove IP addresses from outside the UK?
------------------------------
Julie Selwyn
------------------------------