If $address gives you the correct HOST then you can perform /dns HOST and it should give IP now in order to retrieve this IP to store it has data or whatever you want to do with it you need to look into /help ON DNS
but basically
on *:DNS:echo -a I have retrieved the ip: $raddress