× 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: AS/400 Perl Challenges
  • From: "Gary Kuznitz " <docfxit@xxxxxxxxxxx>
  • Date: Fri, 14 Jan 2000 00:06:10 -0800

On 13 Jan 00, at 14:55, Eric Kempter wrote:
> Gary,
>      How are you going about learning Perl?  

Hi Eric,

Funny you should ask.  I actually wasn't planning on learning Perl 
at all.  I'm trying to put together a way to connect an AS/400 up to 
a dial up ISP with a regular 56k voice grade line.  I thought a 
number of people might be interested in this solution.  Of course 
it's not a great solution for everyone but for anyone that needs to 
support a location that is more than a local phone call away this 
could be setup through the ECS line and could be used with CA 
over the internet.  This is also a great way for someone that is in 
the testing phase of setting up a high speed connection to use this 
low cost connection during development.  The biggest problem with 
this is resolving the dynamic IP address assigned when people 
connect to an ISP.  There are many companies on the internet that 
will resolve a static domain name to a dynamic IP address either 
for free or for a small charge.  The company I would like to use 
supplies a Perl script that needs to be run every time the 400 
connects to the ISP.  It sends the IP address to the company that 
resolves the domain name.  The Perl script was originally set up for 
UNIX.  While the AS/400 has some UNIX similarities in the IFS the 
400 doesn't store the same information in the file structure.  So I 
had to change the Perl script slightly.  I've never worked with Perl 
before and really didn't want to now.  I actually think if I knew more 
about ILE sockets it would be a lot nicer to translate this to RPG 
and then a person wouldn't need to install Perl on the 400.  Thanks 
to Hans I cut down 5 pages of errors down to 3 errors now.  I will 
see if someone on the news group Hans recommended can 
decipher these errors.  Yes Hans, I did read the Perl FAQ and 
couldn't figure out these last three errors.  Thanks again for your 
help.  I didn't expect to learn Perl in a day.  I just need to get this 
running.

If you have any other suggestions I'm all ears.

Thanks again,

Gary Kuznitz

> Thank you,
> 
> Eric Kempter
> *4107
> * Eric.Kempter@robertmondavi.com
> > -----Original Message-----
> > From:       Gary Kuznitz  [SMTP:docfxit@calwest.net]
> > Sent:       Thursday, January 13, 2000 1:46 PM
> > To: boldt@ca.ibm.com; MIDRANGE-L@midrange.com
> > Subject:    Re: AS/400 Perl Challenges
> > 
> > On 13 Jan 00, at 8:01, boldt@ca.ibm.com wrote:
> > > Gary wrote:
> > > >When trying to run a perl script on the 400 I'm getting the 
> > following
> > > >errors:
> > > >    Global symbol "ip" requires explicit package name at , 
line 
> > 14.
> > > >    Global symbol "user" requires explicit package name at 
, line
> > > >14.
> > > Hi Gary!  First off, these errors are not unique to the AS/400.
> > > What's happening is that "use strict;" places certain 
restrictions
> > > on the program for the purpose of weeding out common 
> > programming errors. 
> > > Using "use strict;" is considered a good thing, and forces 
you to 
> > use
> > > certain highly recommended things.  The one thing it 
requires is 
> > that
> > > all variables be declared before use. (That's the message 
you're
> > > getting over and over again.)  Declare your names using the 
> > function
> > > "my".  At the beginning, add the statement "my ($ip, $user, 
> > $pass);"
> > > and you'll eliminate the first 3 of your error messages.
> > > 
> > > Regarding -W, try coding -w instead.
> > > 
> > > (I'm not familiar with "use diagnostics", so I can't help there.)
> > > 
> > > Finally, the best place to start when debugging Perl 
programs is
> > > the documentation.  To start with, check the FAQ at
> > > <http://www.perl.com/pub/v/faqs/>.  When you've read 
everything
> > > and you still can't get things working, check the newsgroup
> > > comp.lang.perl.misc.  But I'll warn you, if they even suspect 
you
> > > haven't read the FAQ, they may not be very helpful.  You're
> > > expected to read the docs first before posting there.
> > > 
> > > Cheers!  Hans
> > > 
> > > Hans Boldt, ILE RPG Development, IBM Toronto Lab, 
> > boldt@ca.ibm.com
> > 
> > Thank you very much Hans.  This is just what I needed.  I'm 
happy to
> > read the documentation now that I know where it's at.  Boy !  I 
sure
> > am glad you started me off on the right foot with the suggestion 
of
> > adding the statement "my ($ip, $user, $pass);" I would have 
never
> > guessed that from the FAQ.  Since I ran the script once with 
the
> > "use strict;" statement and then commented it out because it
> > generated so many errors I'm guessing even though the 
program ended
> > I would have to sign off the session for it to not "use strict;"
> > while running.  Pretty strange it persists after the program 
ended. 
> > 
> > Thanks again,
> > 
> > Gary Kuznitz

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