245 pts.
 ODBC connection and IP address
Is there a way to get the IP address of a client/server job attached to QZDASOINIT?  I can see message CPIAD02 in the QZDASOINIT job log which lists the user and IP address and I need to get this information into a CL program which runs each time the user connects to the QZDASOINIT process. 

Thanks ,

Bisht   



Software/Hardware used:
AS/400
ASKED: March 6, 2011  11:42 AM
UPDATED: March 8, 2011  1:12 AM

Answer Wiki:
1. Obtain the ip from the joblog via DSPJOBLOG *PRINT or from the history log DSPLOG OUTPUT(*PRINT) JOB(JOBNUM/JOBUSER/JOBNAME) MSGID(CPIAD09) 2. Take the splf and copy to physical file CPYSPLF 3. Your CL can now read the file and substring the IP info
Last Wiki Answer Submitted:  March 8, 2011  12:21 am  by  BillyMolintas   85 pts.
All Answer Wiki Contributors:  BillyMolintas   85 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

If your program is called during QZDASOINIT, then you should be able to retrieve the IP address by calling the Retrieve Job Information (QUSRJOBI) API with format JOBI0600. The client IP address is at offset 307.

That’s only a partial solution because it covers only IPv4 addresses. For IPv6 or for combinations of IPv4 and IPv6, you’ll want to do some studying of how the Work Management APIs work overall. It can get complicated quickly.

Tom

 107,735 pts.