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


  • Subject: Re: API to retrieve TCPIP address of the client?
  • From: "Jim Franz" <franz400@xxxxxxxxxxxx>
  • Date: Fri, 8 Jun 2001 03:07:32 -0400

> Does anybody know how to retrieve the tcpip address of a pc attached to
the
> 400.
the (QDCRDEVD) api does this
this is a pgm i built couple years ago. if on v4r4 or earlier, their were
some
ptfs for this. this pgm also sent a msg so i could track in the qhst log.
The pc will need a ftp server running (your description below of user
selecting
record and ftp sending (PUT) makes the 400 the client. this can be tricky.
If you have mapped drives or using netserver there may be other ways.
jim

PGM        PARM(&DEV &ADR &PORT &ERR) /* Retreive +
                          TCP/IP Address For A Device Name */
             DCL        VAR(&DEV) TYPE(*CHAR) LEN(10)
             DCL        VAR(&ADR) TYPE(*CHAR) LEN(15)
             DCL        VAR(&ERR) TYPE(*CHAR) LEN(16)
             DCL        VAR(&PORT) TYPE(*CHAR) LEN(5)
             DCL        VAR(&PORT2) TYPE(*CHAR) LEN(2)
             DCL        VAR(&PORT1) TYPE(*DEC) LEN(5 0)
             DCL        VAR(&VAR) TYPE(*CHAR) LEN(1024)
             DCL        VAR(&MSG) TYPE(*CHAR) LEN(75)
             DCL        VAR(&DEV1) TYPE(*CHAR) LEN(10)
             DCL        VAR(&FMT) TYPE(*CHAR) LEN(8) VALUE('DEVD0600')
             DCL        VAR(&LEN) TYPE(*CHAR) LEN(4) VALUE(X'00000400')
             DCL        VAR(&BYT) TYPE(*CHAR) LEN(4) VALUE(X'00000010')
             DCL        VAR(&PROTOCOL) TYPE(*CHAR) LEN(1) VALUE(X'02')
             DCL        VAR(&NEWPROTO) TYPE(*CHAR) LEN(1)

             CHGVAR     %SST(&ERR 1 4) VALUE(&BYT)
             CHGVAR     VAR(&VAR) VALUE(' ')
             CALL       PGM(QDCRDEVD) PARM(&VAR &LEN &FMT &DEV &ERR)
             CHGVAR     VAR(&DEV1) VALUE(%SST(&VAR 22 10))
             IF         COND(&DEV1 *NE &DEV) THEN(DO)
             CHGVAR     VAR(&MSG) VALUE('Device not found' *BCAT +
                          &DEV *BCAT &ERR)
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSG)
             RETURN
             ENDDO
             IF         COND(%SST(&VAR 859 1) *NE &PROTOCOL) THEN(DO)
             CHGVAR     VAR(&MSG) VALUE('Device not TCP' *BCAT &DEV +
                          *BCAT &ERR)
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSG)
             RETURN
             ENDDO
             CHGVAR     VAR(&NEWPROTO) VALUE(%SST(&VAR 859 1))
             IF         COND(%SST(&VAR 879 1) *NE ' ') THEN(CHGVAR +
                        VAR(&ADR) VALUE(%SST(&VAR 879 13)))
             IF         COND(%SST(&VAR 878 1) *NE ' ') THEN(CHGVAR +
                        VAR(&ADR) VALUE(%SST(&VAR 878 14)))
             IF         COND(%SST(&VAR 877 1) *NE ' ') THEN(CHGVAR +
                        VAR(&ADR) VALUE(%SST(&VAR 877 15)))
             CHGVAR     VAR(&PORT2) VALUE(%SST(&VAR 860 02))
             CHGVAR     VAR(&PORT1) VALUE(%BIN(&PORT2))
             CHGVAR     VAR(&PORT) VALUE(&PORT1)
             CHGVAR     VAR(&MSG) VALUE('Device' *BCAT &DEV *BCAT +
                          'Addr' *BCAT &ADR *BCAT 'Port' *BCAT &PORT)
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSG)
             ENDPGM
----- Original Message -----
From: "ron hawkins" <hwarangron@home.com>
To: <midrange-l@midrange.com>
Sent: Friday, June 08, 2001 2:29 PM
Subject: FW: API to retrieve TCPIP address of the client?


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

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.