[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
determine existance of a remote library
We have a utility that uses the FTPAPI to pass libraries between
System i's.
If the user chooses to do a get we are currently using FTP_List to
check for the existance of the library on the remote server. Here's
the code:
IfsFileName = '/QSYS.LIB/' + %TRIM(LibName) + '.LIB';
rtnCode = FTP_List(Session:IfsFileName:1:%ADDR(rtnFile):rtnCount);
IF rtnCode = -1 OR rtnCount = 0;
MsgText = 'The library ' + %TRIM(LibName)
+ ' does not exist on the remote system.';
AnyErr = YES;
EXSR Exit;
ENDIF;
We recently discovered that a library with out any files (i.e.
programs only) will show as an empty list and be considered not there.
Is there a better way to check for the existance of a library on a
remote server? Perhaps FTP_Chdir?
Brian J. Garland
Vermont Information Processing, Inc.
brian@xxxxxxxxxx
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------