Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Retrieve TCP/IP Information

Posted on 2008-10-30
2
Medium Priority
?
906 Views
Last Modified: 2008-11-10
Does anyone know how to retrieve the HOSTNAME field from TCP/IP in a CL program? The field is the HOSTNAME field if you do a CHGTCPDMN-F4.  It seems like you should be able to retrieve this to be used in a CL, but I haven't been able to find anything regarding it.

I appreciate any help.
0
Comment
Question by:Matthew Roessner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 33

Expert Comment

by:shalomc
ID: 22843333
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/ghostn.htm

I think that you will have to write a wrapper program in RPGLE or C to use this API.

ShalomC
0
 
LVL 27

Accepted Solution

by:
tliotta earned 375 total points
ID: 22855154
hfcsp:

Assuming that you're really intending to mean the field that is affected by the HOSTNAME() parameter, then this is the API that you need:

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/qtocrtvtcpa.htm

As with gethostname() that Shalom suggested, this API must be called as a procedure. For CL, that means you must use ILE CL and use the CALLPRC command. You can bind system service program QTOCNETSTS to access the QtocRtvTCPA API. Request format 'TCPA0300' and extract the value from the field documented as "Host name". Note that "Domain name" is available in the next field.

Tom
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: rfc1180
The Maximum Segment size (MSS) is an important consideration when troubleshooting connectivity via the Internet/Intranet. As the packets are routed via the Internet/Intranet, the packets must traverse through multiple routers in the path between two…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question