× 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.



Rick,

here's what I use to retrieve my IP address to start a CODE server 
instance:

             PGM
             DCL        VAR(&WRKSTN) TYPE(*CHAR) LEN(10)
             DCL        VAR(&SERVER) TYPE(*CHAR) LEN(10)
             DCL        VAR(&DEVNAM) TYPE(*CHAR) LEN(10)
             DCL        VAR(&ERROR) TYPE(*CHAR) LEN(16)
             DCL        VAR(&PROTOCOL) TYPE(*CHAR) LEN(1) VALUE(X'02')
             DCL        VAR(&RCVVAR) TYPE(*CHAR) LEN(1024)
             DCL        VAR(&TCPADR) TYPE(*CHAR) LEN(15)
             CHGVAR     VAR(&RCVVAR) VALUE(' ')
             CHGVAR     VAR(&TCPADR) VALUE(*BLANKS)
             CHGVAR     VAR(&WRKSTN) VALUE(*BLANKS)
             RTVJOBA    JOB(&WRKSTN)
             CHGVAR     VAR(&SERVER) VALUE('OS400')
        /* Call API QDCRDEVD format DEVD0600 */
             CALL       PGM(QDCRDEVD) PARM(&RCVVAR X'00000400' +
                          'DEVD0600' &WRKSTN &ERROR)
             CHGVAR     VAR(&DEVNAM) VALUE(%SST(&RCVVAR 22 10))
        /* No devicename */
             IF         COND(&DEVNAM *EQ ' ') THEN(GOTO CMDLBL(END))
        /* Connectiontype not TCPIP */
             IF         COND(%SST(&RCVVAR 859 1) *NE &PROTOCOL) +
                          THEN(GOTO CMDLBL(END))
        /* First block-address 1 digit (bb1.123.123.123) */
             IF         COND(%SST(&RCVVAR 877 2) *EQ '  ') THEN(DO)
             CHGVAR     VAR(&TCPADR) VALUE(%SST(&RCVVAR 879 13))
                               GOTO CONT
             ENDDO
        /* First block-address 2 digits (b12.123.123.123) */
             IF         COND(%SST(&RCVVAR 877 1) *EQ ' ') THEN(DO)
             CHGVAR     VAR(&TCPADR) VALUE(%SST(&RCVVAR 878 14))
                               GOTO CONT
             ENDDO
        /* First block-address 3 digits (123.123.123.123) */
             IF         COND(%SST(&RCVVAR 877 1) *NE ' ') THEN(DO)
             CHGVAR     VAR(&TCPADR) VALUE(%SST(&RCVVAR 877 15))
             ENDDO
 CONT:
 /* Start Code/400 */

             STRCODE    SERVER(&SERVER) RMTLOCNAME(&TCPADR) +
                          CMNTYPE(*TCPIP) PORT(*DFT)
 END:        ENDPGM

HTH,

Peter Colpaert
Application Developer
Massive - Kontich, Belgium
-----
Real developers never document.  If it was hard to write, it should be 
hard to understand.
-----




CZE Midrange <CZEMidrange@xxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
04/12/2004 02:16
Please respond to Midrange Systems Technical Discussion

 
        To:     midrange-l@xxxxxxxxxxxx
        cc: 
        Subject:        Imaging interface techniques and tools - PART II







If you run this command (after some fairly easy setup work), you can
execute an image file (i.e. Jpeg, BMP) from a 400 C/A 5250 session...which
is great!

RUNRMTCMD CMD('IEXPLORE.EXE c:\KIDS.JPG') RMTLOCNAME('192.168.168.13' *IP)
RMTUSER(username) RMTPWD(user's Password)

My question is, how, from the as400 side, can you retrieve the PC's IP
address that is making the request along with the user and username from
the windows sign in procedure? Sure, you could build a DDS and hard-code
each user, their PC address, user name and password and then extract it
from any RPG program but...it sure would be much cleaner to obtain that
information "softly" rather than rely on "messy" table logic as such
described.

Thanks for your input!

 Rick Rayburn
NYC




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.