× 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: CL FTP question
  • From: Jim Langston <jimlangston@xxxxxxxxxxxxxxxx>
  • Date: Wed, 07 Mar 2001 15:15:00 -0800
  • Organization: Pacer International

Hmmm.. I could think of ways to do it...

One way would be to write a sockets program to open a connection to this
computer on port 21 (FTP port).  If the sockets isn't established, or the
expected FTP greeting isn't received, have the program return some type of
error condition that you can check in CL.  Perhaps force on error.

This is what my AS/400 returns when I connect to it on port 21:
220-QTCP at AS400.
220 Connection will close if idle more than 5 minutes.       

Note, this is a little bit different than what you receive when connecting
through FTP:
Connected to Conex.
220-QTCP at AS400.
220 Connection will close if idle more than 5 minutes.
User (Conex:(none)):

(The "Connected to Conex." and "User (Conex:(none)):" are provided by my
FTP client so you don't want to check for those in the program).

WinNT FTP server responds:
220 file-server Microsoft FTP Service (Version 4.0).                
however.

You could just attempt to connect to port 21, and if you connect close the
port and assume success, but there have been times I was able to connect to
an FTP server just to be told it was down.

Regards,

Jim Langston

Justin Kiteley wrote:
> 
> Hello everyone,
> 
>   Curious to know if there is any way to verufy if a remote host has its FTP
> server up and running.  In a CL batch program I check to see if the host is
> up by using the ping command and rcvmsg.  This works ok, but it does not
> tell me if the remote system has its FTP server running.  I can put some
> code in to review the FTP log after the transaction to look for any of the
> standard FTP numerical error msgs, but I'd like to know before I try to send
> anything if they're FTP is up and running.  Any Ideas?
> 
> Thanks for any help!
> 
> Justin Kiteley
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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.