Hi Johnathan,
Just a minor point about your recent script -
JdBP> /* GET_GLOBAL.CMD -- Retrieve 00GLOBAL.TXT from Hobbes FTP site */
JdBP> if FtpSetUser('hobbes.nmsu.edu', 'anonymous', 'os2user@') then do
JdBP> say 'Successfully connected to hobbes.nmsu.edu.'
While your script will probably work in most cases, it may be interesting to
note that the FtpSetUser() call will ALWAYS return success, if the local
machine REXX FTP environment is working correctly, you do not NEED an Internet
connection to be running at this stage to have the FtpSetUser() function
return "success", it does not even do a DNS lookup at that point...
All FtpSetUser() does is STORE the Site and User parameters locally, so that
the FIRST REXX FTP command that actually REQUIRES a Server response will
perform the FTP OPEN command using those parameters stored from the
FtpSetUser() command, BEFORE it issues the command that needs the response.
JdBP> if FtpChDir('/pub/os2') >= 0 then do
In you case, this is the point at which one can safely assume a "connection"
WAS established. I actually use an FtpPwd() call AFTER the FtpSetUser() to
determine the FTP connection status before I report that the connection was
successful. FtpPwd() MUST obtain a Server response, and because it is
"non-destructive" call, any access/permission issues on the FTP Server will
mask the connection issue. Once the Login is confirmed, THEN I try and change
directories...
Regards...........pk.
--- Maximus/2 3.01
* Origin: Another Good Point About OS/2 (3:772/1.10)
|