The preceding program returns the IP address of the display device associated with the current job.

The original question however was how to return/get the IP address of the AS/400 machine and not of the device (though perhaps the question was worded incorrectly). As the system can have multiple IP addresses more information is needed about the environment the CL program is running in. For instance, does the program have a current socket connection? And what in the world does the Java program need a/the external system IP address of the system for anyway?

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your response...

Discuss This Question: 1 &nbspReply

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Just a minor comment... One reason a program might need to know the local IP address is to insert it as text in an outbound message of some sort. A particular case is IBM's Site Protector product (originally from ISS). It requires the host IP address be embedded as text in the event message from the System i to the Site Protector agent. It took a bit of thought to get the APIs in the proper sequence when I had to do that, and it sure wasn't done in CL. It's rare that any program needs to know where it's coming from instead of where it's going to.
I think it can be done with V5R4 ILE CL; I don't see why not, though I haven't tried. I suspect that those who can do it would use a different language.
Tom

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

Ask a Question

Free Guide: Managing storage for virtual environments

Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!

Share this item with your network:

To follow this tag...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy