Write a RPG (or CL) program to save the data and put it in the INLPGM user profile’s parameter. (Initial program).
With this parameter, every time the user signs in the program will save the data you wish.
The API QDCRDEVD with format DEVD0600, returns ipAddress in position 877 to 891.
Hope this helps.