[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ftp_get to IFS
Sender: "Glenn McClenny" <gmcclenny@xxxxxxxxxxx>
This is my first attempt to use ftpapi get files from an ftp site, and I was 
having an issue with where to put the file.
First, here's my code for the ftp_get routine:
rc = ftp_list(sess : 'I*' : 50 : %addr(Incoming) : NumberOfFiles);
rc = ftp_binaryMode(sess : *off);
FileNumber = 1;
dow FileNumber <= NumberOfFiles;
  rc = ftp_get(sess : Incoming(FileNumber) :
       '/A123456789012345/INVOICES/' +
       %trim(Incoming(FileNumber)));
  WorkMessage = ftp_errorMsg(sess);
  FileNumber += 1;
enddo;
There are 5 files to retrieve from the server, and the Incoming() array has 
the right file names.  When the ftp_get() procedure is issued, I get an 
error message of "No such path or directory."  This path does exist, and I 
have all access to it.
So, I created another IFS directory off the root, and called it AD.  If I 
changed the path in the ftp_get procedure to AD, it works.
I have double checked my spelling of the original path, and even had 
somebody else look it over for a spelling mistake (The A123456789012345 
isn't really the name of the directory, just a representation of the length 
of the directory).  When I look at the ftpapi source, it would appear that 
the max length of the file name fo save is 256 including path name.
Just curious as to why I can't place the file in the specified directory.  
Thanks for your input!
Glenn.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------