|
/********************************************************************/ /* */ /* Retrieve IP Address for a device description. */ /* */ /********************************************************************/ /* */ /* */ /* */ /********************************************************************/ CMD PROMPT('Retrieve IP Address') PARM KWD(DEVD) TYPE(*CHAR) LEN(10) MIN(1) + PROMPT('Device Name') PARM KWD(IPADDR) TYPE(*CHAR) LEN(15) RTNVAL(*YES) + CHOICE('15 A') PROMPT('Dotted IP address') PARM KWD(MSGID) TYPE(*CHAR) LEN(7) RTNVAL(*YES) + CHOICE('7 A') PROMPT('Message ID') PARM KWD(MSGDATA) TYPE(*CHAR) LEN(250) + RTNVAL(*YES) CHOICE('250 A') + PROMPT('Message Data') /DEFINE HSpec /COPY ROUTINES/QRPGLESRC,HSPEC /UNDEFINE HSpec * RTVIPADR - Retrieve the IP address from a device description. * For detailed information see the IBM manual 'OS/400 Configuration * APIs' - Section on 'Retrieve Device Description Information * (QDCRDEVD)'. * Modification log: * 10/25/99 by R.Berendt, CCP of GDS, LLC * Created. /DEFINE DSpec /COPY ROUTINES/QRPGLESRC,SRVPGMCPY /UNDEFINE DSpec D RcvVarLen S 9B 0 D FmtName S 8A D ipaddrp S LIKE(IPAddr) D ExceptionIdP S LIKE(ExceptionId) D ExceptDataP S LIKE(ExceptData) D qdcrdevddev S LIKE(ObjName) C *Entry Plist C Parm qdcrdevddev C Parm ipaddrp C Parm ExceptionIdP C Parm ExceptDataP C Eval RcvVarLen=%len(DEVD0600) C Eval FmtName ='DEVD0600' C Call 'QDCRDEVD' C Parm DEVD0600 C Parm RcvVarLen C Parm FmtName C Parm qdcrdevddev C Parm ERRC0100 * Check for error. C ExceptionId CasEq *blanks Detail C Cas Error C EndCs C SETON LR C Return ********************************************************************** ** Detail - Subroutine to strip out the detail information ********************************************************************** C Detail BegSr C* We use %addr to see if the field is addressable. This will occur C* when a user uses RTVIPADR and doesn't fill out each and every one C* of the possible values. C If %addr(ipaddrp) <> *NULL C Eval ipaddrp = *blanks C Eval ipaddrp=ipaddr C EndIf C If %addr(ExceptionIdP) <> *NULL C Eval ExceptionIdP = ExceptionId C EndIf C If %addr(ExceptDataP) <> *NULL C Eval ExceptDataP = ExceptData C EndIf C EndSr ********************************************************************** ** Error - Subroutine to process error conditions. ********************************************************************** C Error BegSr C* Leave it up to the user. C EndSr Rob Berendt ================== A smart person learns from their mistakes, but a wise person learns from OTHER peoples mistakes. "ron hawkins" <hwarangron@home.co To: <midrange-l@midrange.com> m> cc: Sent by: Subject: FW: API to retrieve TCPIP address of the client? owner-midrange-l@mi drange.com 06/08/2001 01:29 PM Please respond to MIDRANGE-L Does anybody know how to retrieve the tcpip address of a pc attached to the 400? I need to do it programatically - that is the user selects a record from a subfile and the program will FTP the file (represented by the record in the subfile) down to the PC. TIA Ron Hawkins +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.