MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » August 2014

Re: IBM i Access 7.1 - cannot get IP address using RPG



fixed

On 08-Aug-2014 10:10 -0500, kevin wrote:

So I installed IBM i client access 7.1 from the system onto an XP
machine. I am now unable to obtain the IP of the PC in question from
my application.

This has worked for years on the older versions right up to 6.1..

I've tried this program as a test:
<http://www.itjungle.com/mpo/mpo011702-story02.html>
"... sample program ... demonstrates how to use the QDCRDEVD (Retrieve Device Description) API to retrieve a PC's IP address ... Format ... DEVD0600 ..."

It works fine on my Mac and on older client access versions.. This
is critical to the application I have written for my client and now
it no longer works..along with RUNRMTCMD on Win7.. What are IBM
doing... This sort of stuff used to work out of the box...

Anybody solved or come across this.. Are there any setting that need
adjusting?


Given the use of the CA feature still has a TCP/IP workstation emulation session configured, an the program is being run in the interactive job started at the emulated device, I see no reason the information would [legitimately] no longer be stored there; written by the OS WorkStation [WS] feature I expect [using effectively the QWTCHGJB API noted in a doc snippet below], and thus the effect of that IP address being made visible to the QDCRDEVD API should not be associated with the client [software level] if the emulated WS session is configured the same, as an effective TELNET connection. Finding a defect would be difficult, for the variability of the possible symptom keywords; all I found was a v5r4 issue using a Google web search on: INCORROUT "IP ADDRESS" "DEVD0600" OR "QDCRDEVD"

Nonetheless, there is "Client IP address" information available from job and thread APIs that may be helpful?:

<http://www.ibm.com/support/knowledgecenter/api/content/ssw_ibm_i_71/apis/WMAttrDesc.htm>
_Work Management API Attribute Descriptions_
"The purpose of this document is to provide one place that describes all the Job and Thread attributes that are used in all the Work Management APIs. The list of attributes encompasses the following APIs:

• Retrieve Job Information (QUSRJOBI)
• List Job (QUSLJOB)
• Retrieve Current Attribute (QWCRTVCA)
• Open List of Jobs (QGYOLJOB)
• Retrieve Thread Attribute (QWTRTVTA)
• Open List of Threads (QWCOLTHD)

...
... Client IP address - IPv4
...
... Client IP address - IPv4 or IPv6
...

Client IP address - IPv4. The IPv4 address of the client for which this server is doing work. An address is expressed in standard IPv4 dotted-decimal form www.xxx.yyy.zzz (for example, 130.99.128.1). This field is not guaranteed to be an IP address. This field will be blank if the address is not explicitly set to a value by the Change Job (QWTCHGJB) API. For additional usage information of the Client IP address, see _Retrieve Thread Attribute (QWTRTVTA) API_ <http://www.ibm.com/support/knowledgecenter/api/content/ssw_ibm_i_71/apis/qwtrtvta.htm>.

Client IP address - IPv4 or IPv6. The IPv4 or IPv6 address of the client for which the specified thread of this server most recently communicated with over sockets. If this field is requested for a job, the value from the initial thread of the job will be returned. If a sockets connection has not been established in the initial thread, ≥ or a sockets close() operation has been done ≤ this field will be blank. An IPv4 address is expressed in standard dotted-decimal form www.xxx.yyy.zzz (for example, 130.99.128.1). An IPv6 address always has at least one occurrence of a colon (':') in the format. Some possible IPv6 address formats would be: ::x (for example, ::1) or ::w.xxx.y.zzz (for example, ::9.130.4.169). For further IPv6 examples and explanation ...
..."






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact