× 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: How to Retrieve IP Address of a session using CL
  • From: Winardi <winardi@xxxxxxxxxxxxxxxxxx>
  • Date: Fri, 23 Apr 1999 09:47:29 +0700

        I tried to crtclpgm as attach bellow but still error at SAE command.

> SAE        ID(DSPIPADR) ENTDTA('The DSPIPADR program + 
> has been executed.')
> 
> 
> ----------
> From:         Allen, Stuart[SMTP:sallen@fellowes.com]
> Reply To:     MIDRANGE-L@midrange.com
> Sent:         Wednesday, April 14, 1999 3:56 PM
> To:   'MIDRANGE-L@midrange.com'
> Subject:      RE: How to Retrieve IP Address  of a session using CL
> 
> I asked a similar question last month; here are the replies i got.
> Haven't
> had a chance to try them yet - y2k implementations and all.
> Let me know how you get on.
> 
> Stuart Allen
> sallen@fellowes.com
> 
> 
> -----Original Message-----
> From: Shannon O'Donnell [SMTP:ORION@auburnctnet.com]
> Sent: Friday, March 12, 1999 4:52 PM
> To:   MIDRANGE-L@midrange.com
> Subject:      Re: TCPIP address of PC5250 user for RUNRMTCMD
> 
> Stuart,
> 
> Use the QDCREDVD API format DEVD0600 to retrieve the IP address of
> individual
> devices.  I don't remember the exact position this information is stored
> in
> in
> this API (849?) off the top of my head, but you can look in the API manual
> under
> Configuration APIs and you'll find it.
> 
> Or:
> 
> -----Original Message-----
> From: Graap, Ken [SMTP:keg@gasco.gasco.com]
> Sent: Friday, March 12, 1999 5:46 PM
> To:   'sallen@fellowes.com'
> Subject:      Retrieving an IP address....
> 
> Stuart..
> 
> Here is the program I use to retrieve an IP address from an interactive
> green screen session:
> 
> SOURCE FILE . . . . . . .  KENNETH/QPGMSRC
>   MEMBER  . . . . . . . . .  DSPIPADR
> 
>   SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6
> ...+...
> 
>     100 /* **************************************************************
> */
> 
>     200 /* PROGRAM DESCRIPTION :                                          
>     300 /*
> */
> 
>     400 /* RETRIVE THE CURRENT INTERACTIVE JOBS IP ADDRESS
> */
> 
>     500 /*
> */
> 
>     600 /* SPECIAL COMPILE OPTIONS:
> */
> 
>     700 /*
> */
> 
>     800 /*           WRITTEN BY: KEN GRAAP 09/23/98
> */
> 
>     900 /*           UPDATED BY:           10/07/98 ADD THE SAE CMD
> */
> 
>    1000 /*
> */
> 
>    1100 /* **************************************************************
> */
> 
>    1200              PGM
>    1300 /* **************************************************************
> */
> 
>    1400 /*
> */
> 
>    1500 /* DECLARE PROGRAM VARIABLES
> */
> 
>    1600 /*
> */
> 
>    1700 /* **************************************************************
> */
> 
>    1800              DCL        &ERRORSW *LGL                     /* Std
> err
> */
>    1900              DCL        &MSGID *CHAR LEN(7)               /* Std
> err
> */
>    2000              DCL        &MSGDTA *CHAR LEN(100)            /* Std
> err
> */
>    2100              DCL        &MSGF *CHAR LEN(10)               /* Std
> err
> */
>    2200              DCL        &MSGFLIB *CHAR LEN(10)            /* Std
> err
> */
>    2201              DCL        VAR(&DEVD) TYPE(*CHAR) LEN(10)
> 
>    2202              DCL        VAR(&IP) TYPE(*CHAR) LEN(15)
> 
>    2203              DCL        VAR(&RECEIVER) TYPE(*CHAR) LEN(892)
> 
>    2204              DCL        VAR(&LENGTH) TYPE(*CHAR) LEN(4)
> 
>    2205              DCL        VAR(&ERRLENGTH) TYPE(*CHAR) LEN(4)
> 
>    2300 /* **************************************************************
> */
> 
>    2400 /*
> */
> 
>    2500 /* GLOBAL MESSAGE MONITOR
> */
> 
>    2600 /*
> */
> 
>    2700 /* **************************************************************
> */
> 
>    2800              MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(STDERR1))
> 
>    2900 /* **************************************************************
> */
> 
>    3000 /*
> */
> 
>    3100 /* RETRIVE THE CURRENT DEVICE IP ADDRESS
> */
> 
>    3200 /*
> */
> 
>    3300 /* **************************************************************
> */
> 
>    3400
> 
>    3401              SAE        ID(DSPIPADR) ENTDTA('The DSPIPADR program
> +
> 
>    3402                           has been executed.')
> 
>    3403
> 
>    3404              RTVJOBA    JOB(&DEVD)
> 
>    3405              CHGVAR     VAR(%BIN(&LENGTH)) VALUE(892)
> 
>    3406              CHGVAR     VAR(%BIN(&ERRLENGTH)) VALUE(0)
> 
>    3407              CALL       PGM(QDCRDEVD) PARM(&RECEIVER &LENGTH +
> 
>    3408                           DEVD0600 &DEVD &ERRLENGTH)
> 
>    3409              CHGVAR     VAR(&IP) VALUE(%SST(&RECEIVER 878 15))
> 
>    3410              SNDPGMMSG  MSG(&IP)
> 
>    3600
> 
>    3700 /* **************************************************************
> */
> 
>    3800 /*
> */
> 
>    3900 /* NORMAL END OF PROGRAM
> */
> 
>    4000 /*
> */
> 
>    4100 /* **************************************************************
> */
> 
>    4200  END:        RETURN
> 
>    4300 /* **************************************************************
> */
> 
>    4400 /*
> */
> 
>    4500 /* STANDARD ERROR PROCESSING
> */
> 
>    4600 /*
> */
> 
>    4700 /* **************************************************************
> */
> 
>    4800  STDERR1:               /* Standard error handling routine */
>    4900              IF         &ERRORSW SNDPGMMSG MSGID(CPF9999) +
>    5000                           MSGF(QCPFMSG) MSGTYPE(*ESCAPE) /* Func
> chk
> */
>    5100              CHGVAR     &ERRORSW '1' /* Set to fail ir error
> occurs
> */
>    5200  STDERR2:    RCVMSG     MSGTYPE(*DIAG) MSGDTA(&MSGDTA)
> MSGID(&MSGID)
> +
>    5300                           MSGF(&MSGF) MSGFLIB(&MSGFLIB)
>    5400              IF         (&MSGID *EQ '       ') GOTO STDERR3
>    5500              SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
>    5600                           MSGDTA(&MSGDTA) MSGTYPE(*DIAG)
>    5700              GOTO       STDERR2 /* Loop back for addl diagnostics
> */
>    5800  STDERR3:    RCVMSG     MSGTYPE(*EXCP) MSGDTA(&MSGDTA)
> MSGID(&MSGID)
> +
>    5900                           MSGF(&MSGF) MSGFLIB(&MSGFLIB)
>    6000              SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
>    6100                           MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE)
>    6200              ENDPGM
> 
> 
>                                   * * * *  E N D  O F  S O U R C E  * * *
> *
> 
> 
> Kenneth
> 
> --
> ********************************
>        Kenneth  E.  Graap
>     IBM Certified Specialist
>           AS/400   Professional 
>           System  Administrator
>  NW Natural - Information Services
>            System Services
>         503 226 4211 X5537
>           FAX  503 721 2521
>       keg@nwnatural.com
> ********************************
> 
> 
> > -----Original Message-----
> > From:       SatyaNarayana A.N.V [SMTP:satya400@yahoo.com]
> > Sent:       Wednesday, April 14, 1999 5:00 AM
> > To: MIDRANGE-L@midrange.com
> > Subject:    How to Retrieve IP Address  of a session using CL
> > 
> > 
> > Hi everyone! How can I retrieve the IP address and Port number of my
> > session ? 
> > 
> > I tried WRKTCPSTS OPTION(*CNN). But the output lists all the IP
> > addresses of all those clients who are connected to AS/400. But my need
> > is to extract programatically (in CL) the current IP address and Port
> > Number. I need this information for JAVA Remote AWT Programs. 
> > 
> > Any directions Please? 
> > 
> > Thanks In Advance 
> > 
> > ANV SatyaNarayana 
> > satya400@yahoo.com
> > 
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.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
> > +---
> +---
> | 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 ...


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.