I think you are mixing concepts. Take into account this:
So, you cannot access a F5 config using iRule commands.
One idea that you could use is to resolv your server hostname using your DNS.
[lindex [RESOLV::lookup $hostname] 0]
Ok fair enough, Rene! 😃
But generally, deprecated doesn't mean immediate death sentence. Test, test, then test some more, and as I recommend with any new release, comb the release notes and if there is a better way forward with any implementation, iterate through those updates as resources allows.