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



Really all you need to do to see if the FTP server is up is make a socket
connection to the FTP port (port 21) of the server in question.   Once
the connection has been made, simply close it right away.

For information on sockets programming in RPG:
     http://www.scottklement.com/rpg/socktut/

Another way would be to use my FTPAPI package (open source/free of charge)
to do an FTP_Conn() followed by an FTP_quit.
     http://www.scottklement.com/ftpapi/

Either of these would be a lot more robust, and (once you got over the
learning curve) easier than trying to do it with an FTP script, because
you wouldn't have to parse the output.

Good Luck!



On Mon, 27 Jan 2003, Loyd Goodbar wrote:

> I need to check that some external FTP servers are running. (FWIW, various EDI
> FTP servers over an ANX connection). However, the routers and firewalls block
> ping requests.
>
> >From the command line, I can do an FTP 'w.x.y.z' and look at the resulting
> screen, it usually says "Welcome ..." or "Connection failed." That's all I
> would need to see, then F3 to exit the session.
>
> If I get a Connection failed, then I could send emails to our shippers and IT
> folks up the line.
>
> Is there an easy way to capture/parse the connection messages? I want to
> schedule this type of job to run every 10-15 minutes.
>
> pgm
> ftp 'blah'
> /* look through the ftp logs */
> /* if the first output is Connection to host failed... */
> snddst...
> endpgm
>
> Thanks,
> Loyd
> --
> "Why, you can even hear yourself think." --Hobbes
> "This is making me nervous. Let's go in." --Calvin
> loyd@blackrobes.net  ICQ#504581  http://www.blackrobes.net/
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>


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.