Hi David. 1. Would it be a good thing if those error codes were documented somewhere? Or, even better, replaced with a human explanation in the message.
2. I've added an improved message to the rxftp class. What's the procedure for adding this to the library? Is there an svn repository per chance? (BTW this class's diagnostics are a tad flaky at times: looks like it could do with an overhaul at some time.) 3. The problem with this local file seems intermittent, unpredictable, and not always repeatable. I seem to have fixed it for now (which means only I haven't managed to get it to reoccur in my testing again) by ERASEing the local file immediately before issuing the ftpget. 4. If you can tell me what file state information you would like on the file, and how to obtain it, I'll add it in and rerun it without the erase. i ------ Original Message ------ Received: 08:28 AM COT, 09/25/2009 From: David Ashley <david.ashley....@gmail.com> To: Open Object Rexx Users <oorexx-users@lists.sourceforge.net> Subject: Re: [Oorexx-users] Errors with the ftpget method > On 09/24/2009 07:43 PM, Ian S. Worthington wrote: > > Working through the ftp class, trying to persuade it so give me some useful > > diagnostics when it fails I find that the floc~open('write replace') suddenly > > fails giving ERROR:13. > > > > This code is in a loop downloading files to the same temporary file, > > processing them, then repeating. Two examples are shown below, the last good > > one, then the failing one. > > > > The ERROR: codes don't seem to be documented anywhere: How can I find out > > what 13 represents? > > > > > > 1196 *-* retc = self~ftppasv() > > sendcmd invoked, cmd = PASV > > PASV > > SockSend: cmd sent successfully > > SockRecv: 50 bytes received > > 227 Entering Passive Mode (148,171,100,1,184,61) > > >>> "0" > > 1197 *-* if retc = -1 > > >>> "0" > > 1201 *-* if self~pasvrecv(flocal) = -1 > > Getting a socket. > > Connecting to 148.171.100.1:47165. > > Opened local file. > > >>> "0" > > 1206 *-* end > > 1209 *-* retc = self~transactsock('RETR' fremote, '150') > > sendcmd invoked, cmd = RETR 'YT99T.TPFD.T96.O020883' > > RETR 'YT99T.TPFD.T96.O020883' > > SockSend: cmd sent successfully > > SockRecv: 47 bytes received > > SockRecv: unexpected response: 550 Data set YT99T.TPFD.T96.O020883 not found > > >>> "1" > > 1210 *-* self~debugsay(self~cmdresponse[self~cmdresponse~items]) > > 550 Data set YT99T.TPFD.T96.O020883 not found > > 1211 *-* if retc = .true > > >>> "1" > > 1211 *-* then > > 1211 *-* do > > 1212 *-* self~response = .array~new() > > >>> "an Array" > > 1213 *-* self~debugsay('Error: RETR command to' self~rhost > > 'failed.') > > Error: RETR command to 148.171.100.1 failed. > > 1214 *-* self~ftperrno = 'FTPCOMMAND' > > >>> "FTPCOMMAND" > > 1215 *-* return -1 > > >>> "-1" > > FTP get error, FtpErrno = FTPCOMMAND > > Response: 550 Data set YT99T.TPFD.T96.O020883 not found > > > > > > > > > > > > 1196 *-* retc = self~ftppasv() > > sendcmd invoked, cmd = PASV > > PASV > > SockSend: cmd sent successfully > > SockRecv: 50 bytes received > > 227 Entering Passive Mode (148,171,100,1,184,62) > > >>> "0" > > 1197 *-* if retc = -1 > > >>> "0" > > 1201 *-* if self~pasvrecv(flocal) = -1 > > Getting a socket. > > Connecting to 148.171.100.1:47166. > > Error opening local file temp.script, retc from open = ERROR:13 > > >>> "1" > > 1201 *-* then > > 1201 *-* do > > 1202 *-* self~debugsay('Error creating connection socket.') > > Error creating connection socket. > > 1203 *-* self~ftperrno = 'FTPCOMMAND' > > >>> "FTPCOMMAND" > > 1204 *-* return -1 > > >>> "-1" > > FTP get error, FtpErrno = FTPCOMMAND > > > > ------ Original Message ------ > > Received: 09:13 PM COT, 09/23/2009 > > From: "Ian S. Worthington"<ianworthing...@usa.net> > > To: "oorexx-users"<oorexx-users@lists.sourceforge.net> > > Subject: [Oorexx-users] Errors with the ftpget method > > > > > >> Hi. > >> > >> I'm occasionally getting FTP GET errors using the ftpget method and find > >> > > the > > > >> ftperrno of rather limited use in diagnosing the problem. > >> > >> Here's a sample trace showing such a problem. Is the actual error exposed > >> anywhere other than by turning on debugsay? > >> > >> > >> Getting 'YT99T.TPFD.#020902.SCRIPT' ... > >> 1135 *-* if arg()> 3 > >> >>> "0" > >> 1136 *-* if arg()< 2 > >> >>> "0" > >> 1137 *-* if arg() = 2 > >> >>> "0" > >> 1141 *-* else > >> 1141 *-* do > >> 1142 *-* use arg flocal, fremote, typestr > >> >>> "temp.script" > >> >>> "'YT99T.TPFD.#020902.SCRIPT'" > >> >>> "ASCII" > >> 1143 *-* if typestr~substr(1, 1) = 'A' > >> >>> "1" > >> 1143 *-* then > >> 1143 *-* tmptype = .true > >> >>> "1" > >> 1146 *-* end > >> 1148 *-* self~thrdstatus = '' > >> >>> "" > >> 1151 *-* if tmptype<> self~ascii > >> >>> "0" > >> 1161 *-* if self~csock = 0 > >> >>> "0" > >> 1167 *-* if self~mode = .true > >> >>> "0" > >> 1194 *-* else > >> 1194 *-* do > >> 1196 *-* retc = self~ftppasv() > >> >>> "0" > >> 1197 *-* if retc = -1 > >> >>> "0" > >> 1201 *-* if self~pasvrecv(flocal) = -1 > >> >>> "1" > >> 1201 *-* then > >> 1201 *-* do > >> 1202 *-* self~debugsay('Error creating connection socket.') > >> 1203 *-* self~ftperrno = 'FTPCOMMAND' > >> >>> "FTPCOMMAND" > >> 1204 *-* return -1 > >> >>> "-1" > >> FTP get error, FtpErrno = FTPCOMMAND > >> Response: 227 Entering Passive Mode (148,171,100,1,132,58) > >> > >> > >> > > > > > > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry® Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9-12, 2009. Register now! > > http://p.sf.net/sfu/devconf > > _______________________________________________ > > Oorexx-users mailing list > > Oorexx-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/oorexx-users > > > > > Error 13 is a "permission denied" error. This is probably because the > file is either still open or because of some other problem. So the first > task in debugging this is to find out what the state of the file is just > prior to the open. Then we can locate the code causing the problem. > > David Ashley > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Oorexx-users mailing list > Oorexx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-users > ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users