The question might be too vague.
Is it asking how to find the IP address of a remote AS/400? Is it asking how to code a program to find the IP address of the system that the program runs on? Is it asking how to find what IP address is in use by default within an AS/400? Is it asking how to find what IP address is associated with an AS/400 host name? Is it asking how to find what the host name is of “this” AS/400?
Lots of variations are possible. An AS/400 may have many possible host names and many IP addresses. The addresses may be distributed across multiple NICs or assigned to a single NIC. An AS/400 may have “virtual” addresses…
The simple answer given is the most direct and is as good as any, given how vague the question is. Many other answers are possible — especially if the TCP/IP configuration isn’t correct in the first place.
Ping is a nice simple way to do this and works well. This is the result of pinging an AS/400 from my PC:
Pinging srpin270 [192.168.3.15] with 32 bytes of data:
Reply from 192.168.3.15: bytes=32 time=35ms TTL=28
Reply from 192.168.3.15: bytes=32 time=39ms TTL=28
Reply from 192.168.3.15: bytes=32 time=25ms TTL=28
Reply from 192.168.3.15: bytes=32 time=26ms TTL=28
Ping statistics for 192.168.3.15:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 25ms, Maximum = 39ms, Average = 31ms