× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Maybe you can use the API  QUSRJOBI and its format JOBI0600.  This only
needs the job information to return the IP address.

I use this in my WRKODBCJOB program (
http://home.columbus.rr.com/jbmmdietz/iseries.html ).

http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/qusrjobi.htm


The netstat API should be QtocRtvNetCnnDta You need to provide the IP
Address and the port number to get the Job information back.
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/qtocrtvnetcnndta.htm



----------------------------
Bryan Dietz

midrange-l-bounces@xxxxxxxxxxxx wrote on 01/04/2005 05:49:58 AM:

> Hi group,
>
> I have a tricky situation that I'm trying to solve, without success so
> far.
>
> We have a client-server package that runs a batch job for each user
> connected to the iSeries (V5R1M0).
>
> Sometimes, the user needs to download a document from his 'home' server,
> the location of which is kept in a user file.  These documents are
> replicated to several different servers located around the globe.
>
> There are a number or roaming users, and when they are working away from
> home, the system should of course refer to the closest server, which may
> or may not be their usual 'home server'.
>
> My idea was to have the job retrieve the user's IP address, which will
> beyond doubt identify the location from where the user is logged in, and
> the closest server.
>
> I know how to do this for an interactive (5250) session, but there's no
> device description associated with these batch jobs so that approach
> cannot be used.
>
> We are always certain of the local port used by the application, and of
> course we know the job name & number.
>
> Is there any way - using an API - to retrieve the remote address
> associated with a certain local address / job combination in the TCP/IP
> connections?
>
> When looking at NETSTAT *CNN, I can do a subset by local port, and then
> look at the jobs associated with each remote address, but I need to do
> this from within a program.
>
> Thanks in advance!
>
> Peter Colpaert


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.