Solved

Retrieve TCP/IP Information

Posted on 2008-10-30
2
869 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
2 Comments
 
LVL 32

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 125 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now