|
Here is a CL program that works, unlike some programs I post. At least it compiled and told me the IP address I was logged in to. There is something wrong with the Printer part, but you only care about the IP address, right? Rather than butcher the code, here's the whole piece - you butcher it. PGM /* .............................................................. */ /* ..........THIS PROGRAM SIMPLY DISPLAYS who I am */ /* ..... . */ DCL VAR(&MSGTXT) TYPE(*CHAR) LEN(85) DCL VAR(&NAME) TYPE(*CHAR) LEN(10) DCL VAR(&printer) TYPE(*CHAR) LEN(10) DCL VAR(&DATE6) TYPE(*CHAR) LEN(6) DCL VAR(&DATE8) TYPE(*CHAR) LEN(10) DCL VAR(&BIN4) TYPE(*CHAR) LEN(4) DCL VAR(&RCV) TYPE(*CHAR) LEN(893) DCL VAR(&RCVLEN) TYPE(*CHAR) LEN(4) DCL VAR(&RCVLEND) TYPE(*DEC) LEN(9) DCL VAR(&ERR) TYPE(*CHAR) LEN(100) DCL VAR(&DEC8) TYPE(*DEC) LEN(8 0) DCL VAR(&FRMCFG) TYPE(*CHAR) LEN(8) VALUE('CFGD0200') DCL VAR(&DEVD) TYPE(*CHAR) LEN(10) DCL VAR(&FRMDEV) TYPE(*CHAR) LEN(8) VALUE('DEVD0600') DCL VAR(&IP) TYPE(*CHAR) LEN(15) DCL VAR(&PASTHR) TYPE(*CHAR) LEN(1) CHGVAR VAR(&RCVLEND) VALUE(893) CHGVAR VAR(%BIN(&RCVLEN)) VALUE(&RCVLEND) CHGVAR VAR(%BINARY(&BIN4)) VALUE(&DEC8) RTVJOBA USER(&NAME) JOB(&DEVD) DATE(&DATE6) + PRTDEV(&PRINTER) /* get information */ CALL PGM(QDCRDEVD) PARM(&RCV &RCVLEN &FRMDEV + &DEVD &ERR) CHGVAR VAR(&IP) VALUE(%SST(&RCV 878 15)) CVTDAT DATE(&DATE6) TOVAR(&DATE8) TOFMT(*DMYY) + TOSEP(/) CHGVAR VAR(&MSGTXT) VALUE('User-' *CAT &NAME *CAT + 'Printer-' *CAT &PRINTER *CAT &DATE8 + *BCAT 'IP Address-' *BCAT &IP) SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSGTXT) + TOPGMQ(*EXT) MSGTYPE(*INQ) _______________________ Booth Martin boothm@earth.goddard.edu http://www.spy.net/~booth _______________________ "Silvio Santos" <Silvio.Santos@brainag.com> Sent by: owner-rpg400-l@midrange.com 12/10/1999 02:12 PM Please respond to RPG400-L To: RPG400-L@midrange.com cc: Subject: Its possible to know the IP of diff sessions with the same login Hello! I had posted this message in other forums but nobody answered it. So I am posting it here knowing that it hasnt to do with RPG directly. Its possible to know the IP address of a session supposing that there are some people using the same account in different computers ? TIA, Silvio. +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-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.