× 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: default route with PPP
  • From: "Art Tostaine, Jr." <art@xxxxxxxxxxx>
  • Date: Mon, 25 Jun 2001 09:03:32 -0400
  • Importance: Normal

I submit this program with parameter *YES if I want to send an email to
someone when the 400 connected.  I haven't used or tested this since V4R2,
so it may need to be "tweaked".

             PGM        PARM(&EMAIL)
             DCL        VAR(&EMAIL) TYPE(*CHAR) LEN(4)
             DCL        VAR(&MSG) TYPE(*CHAR) LEN(132)
             DCL        VAR(&MSG2) TYPE(*CHAR) LEN(2000)
             DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7)
             DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(14)
             DCL        VAR(&ERROR ) TYPE(*CHAR) LEN(3 )

/* TRY TO ALLOCATE MESSAGE QUEUE, IF FAILS, ENDPROGRAM */

             ALCOBJ     OBJ((QTCP *MSGQ *EXCL)) WAIT(0)
             MONMSG     MSGID(CPF1002) EXEC(GOTO CMDLBL(ENDPROGRAM))
             DLCOBJ     OBJ((QTCP *MSGQ *EXCL))

/* WAIT HERE FOREVER FOR MESSAGE TCP8344 WITH IP ADDRESS */

 WAITAGAIN:  CHGVAR     VAR(&MSGID) VALUE('       ')
             RCVMSG     MSGQ(QTCP) WAIT(*MAX) RMV(*NO) MSG(&MSG) +
                          SECLVL(&MSG2) MSGDTA(&MSGDTA) MSGID(&MSGID)

             IF         COND(&MSGID *EQ 'TCP8344') THEN(GOTO +
                          CMDLBL(IPSTARTED)) /* Interface Started */

             IF         COND(&MSGID *EQ 'TCP8343') THEN(GOTO +
                          CMDLBL(IPENDED)) /* Interface Ended */

             GOTO       CMDLBL(WAITAGAIN)

/* SEND MESSAGE TO SYSOPR */

 IPSTARTED:
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSG) +
                          TOUSR(*SYSOPR)

/* SEND EMAILS TO EVERYONE TO TELL THEM OF THE NEW ADDRESS */

             IF         (&EMAIL *EQ '*YES') THEN(DO)
             SNDDST     TYPE(*LMSG) +
                          TOINTNET((someone@somewhere.com)) +
                          DSTD(DESCRIPTION) MSG('Host IP Address +
                          is' *BCAT &MSGDTA) LONGMSG(' ') +
                          SUBJECT('Host now connected to the +
                          internet')
             ENDDO

             GOTO       CMDLBL(WAITAGAIN)

 IPENDED:
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSG) +
                          TOUSR(*SYSOPR)

             GOTO       CMDLBL(WAITAGAIN)

 ENDPROGRAM: ENDPGM

Art Tostaine, Jr.
CCA, Inc.
Jackson, NJ 08527

-----Original Message-----
From: owner-midrange-l@midrange.com
[mailto:owner-midrange-l@midrange.com]On Behalf Of Carl Galgano
Sent: Monday, June 25, 2001 7:13 AM
To: MIDRANGE-L@midrange.com
Subject: RE: default route with PPP


Art:
That would be helpful.... I looked in my archives for the code and could not
find it.
Thanks.
cjg


Carl J. Galgano
EDI Consulting Services, Inc.
550 Kennesaw Avenue, Suite 800
Marietta, GA  30060
(770) 422-2995 - voice
(419) 730-8212 - fax
mailto:cgalgano@ediconsulting.com
http://www.ediconsulting.com
AS400 EDI, Networking, E-Commerce and Communications Consulting and
Implementation
http://www.icecreamovernight.com
Premium Ice Cream Brands shipped Overnight

"You ain't gonna learn what you don't want to know" - rw

-----Original Message-----
From: owner-midrange-l@midrange.com
[mailto:owner-midrange-l@midrange.com]On Behalf Of Art Tostaine, Jr.
Sent: Sunday, June 24, 2001 9:50 PM
To: MIDRANGE-L@midrange.com
Subject: RE: default route with PPP


Carl:

I had sent you that simple program that monitors the QTCPxxxx message queue
and extracts the IP address assigned from the message received when the
dialup connection is made.

Would you like to see that CLP again?  It's not an API call, but it does
work.

Art Tostaine, Jr.
CCA, Inc.
Jackson, NJ 08527

-----Original Message-----
From: owner-midrange-l@midrange.com
[mailto:owner-midrange-l@midrange.com]On Behalf Of Carl Galgano
Sent: Sunday, June 24, 2001 8:43 AM
To: MIDRANGE-L@midrange.com
Subject: RE: default route with PPP


Peter:
I have not seen a command that lets you extract the IP address assigned by
the remote DHCP server.  I am willing to bet there is an API for it.  Having
never written code using an API, I was hoping to avoid that.  It seems that
there should be a rather simple solution to this problem.  We can do it with
CISCO routers by allowing the router to sense the primary T1 is down and
using a secondary default route to connect over an ISDN route.
Any one know if there is an API to extract the address assigned during a
dial up PPP session?
cjg


Carl J. Galgano
EDI Consulting Services, Inc.
550 Kennesaw Avenue, Suite 800
Marietta, GA  30060
(770) 422-2995 - voice
(419) 730-8212 - fax
mailto:cgalgano@ediconsulting.com
http://www.ediconsulting.com
AS400 EDI, Networking, E-Commerce and Communications Consulting and
Implementation
http://www.icecreamovernight.com
Premium Ice Cream Brands shipped Overnight

"You ain't gonna learn what you don't want to know" - rw

-----Original Message-----
From: owner-midrange-l@midrange.com
[mailto:owner-midrange-l@midrange.com]On Behalf Of Peter Dow
Sent: Saturday, June 23, 2001 5:54 PM
To: MIDRANGE-L@midrange.com
Subject: Re: default route with PPP


Hi Carl,

Is there any way to determine the IP address assigned by your ISP's DHCP
server after you connect?  If so, I'd think you could use that to update the
default route when you dial up.

hth,
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax

----- Original Message -----
From: "Carl Galgano" <cgalgano2@ediconsulting.com>
To: <MIDRANGE-L@midrange.com>
Sent: Saturday, June 23, 2001 12:16 PM
Subject: RE: default route with PPP


> Problem with that is that the interface address changes each time I dial
the
> ISP because they assign the IP address via DHCP when I connect w/PPP.
> cjg
>
>
> Carl J. Galgano
> EDI Consulting Services, Inc.
> 550 Kennesaw Avenue, Suite 800
> Marietta, GA  30060
> (770) 422-2995 - voice
> (419) 730-8212 - fax
> mailto:cgalgano@ediconsulting.com
> http://www.ediconsulting.com
> AS400 EDI, Networking, E-Commerce and Communications Consulting and
> Implementation
> http://www.icecreamovernight.com
> Premium Ice Cream Brands shipped Overnight
>
> "You ain't gonna learn what you don't want to know" - rw
>
> -----Original Message-----
> From: owner-midrange-l@midrange.com
> [mailto:owner-midrange-l@midrange.com]On Behalf Of Evan Harris
> Sent: Thursday, June 21, 2001 3:57 PM
> To: MIDRANGE-L@midrange.com
> Subject: Re: default route with PPP
>
>
> Carl
>
> have you tried associating the default routes with a specific interface ?
>
> I seem to remember having the same problem when adding an internet
> connection and bound each of the default routes I needed to a specific
> interface.
>
> Sorry I can't remember the parameters that I added but maybe this will
> point you in the right direction.
>
> Hope this helps
>
> Regards
> Evan Harris
>
> >I am developing some code for a client.  Basically the code will attempt
to
> >FTP to a site on the internet over the company's existing T1.  I ping the
> >FTP server first to see if the route is there.  If I can not get a return
> on
> >my ping I want to start a PPP dial up connection to an ISP, and then do
the
> >FTP over the dial up line.
> >
> >All the pieces work fine, except one.  In my PPP profile I have set that
> the
> >dial up connection gets assigned the default route.  If I currently have
a
> >default route set up in my routing table, the PPP connection will not
work,
> >it says there is already a default route set up.  If I remove the default
> >route on the AS400, the PPP connection works fine and the data is routed
> >over the dial up to the internet.  All of my customer's systems already
> have
> >a default route set up on their AS400 pointing to the local router so the
> >data is moved over their WAN.  The only way I see to solve this problem
is
> >to programmatically remove the default route in the routing table, start
my
> >PTP PPP connection, do my FTP, end the PPP connection and then
> >programmatically add the default route entry back to the AS400.  This
seems
> >less than elegant.  Any better ideas?
> >cjg
>
> +---
> | 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
> +---


_________________________________________________________
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
+---

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