| Subject | : | how do you get return codes from os/2 ftp like m/f (exit? |
| Author | : | dljone9 dljone9@os2world.com |
| Date | : | 13 Sep, 2005 on 20:57 |
| We're trying to get return code information from an os/2 ftp session. A parm like (exit on the mainframe or (exit on unix is desired. We are using a netrc file with a command line script like: ftp destination.server.com < ftpcmds >ftplog.txt Is there a way to get the ftp return code information? error ### from DosOpen Thanks in advance for your help. |
| Subject | : | Re:how do you get return codes from os/2 ftp like m/f (exit? |
| Author | : | warpcafe warpcafe@yahoo.de |
| Date | : | 14 Sep, 2005 on 12:06 |
| Hi, not sure if I understand correctly... what are you trying to do? Is the FTP client an OS/2 machine? What OS is the FTP server on? I did a quick try on my os/2 machine here: If you want a "return code" from the ftp session, I can't tell you better than the following...: Cheers |
| Subject | : | Re:how do you get return codes from os/2 ftp like m/f (exit? |
| Author | : | warpcafe warpcafe@yahoo.de |
| Date | : | 14 Sep, 2005 on 12:11 |
| Oh, BTW... I forgot: "Error xxx from DosOpen" to me most probably means that one of the two files you're "piping" cannot be found... thus the ftpcmds or the ftplog.txt... ...you might tell us what your "ftpcmds" contains? Greetings |
| Subject | : | Re:how do you get return codes from os/2 ftp like m/f (exit? |
| Author | : | phaelonimaire |
| Date | : | 14 Sep, 2005 on 18:51 |
| If I remember correctly, you have to use the batch ERRORLEVEL thing to get the programs' return. It may be easier (this is assuming you're using OS/2 for the client) to use the REXX FTP API. I use it to post files to an FTP site upon connection to the internet via In-Joy. I did this a number of years ago because I could not get redirection of input to work properly with the ftp client. It also may be worth noting that FTP may use stderr for some of its messages, so you'll have to redirect like 2>>&1 >file.name so that stderr gets merged with stdout. It is yet also possible that FTP is evil like some VIO apps and you just can't redirect the output. In any case, I think if you have the REXX API available, it would be far easier to script and control. The put, get, and like commands all are functions and return errors. ..This is much easier to deal with than parsing a text file, in my opinion. I could provide what I have if anyone's interested. |
| Subject | : | Re:how do you get return codes from os/2 ftp like m/f (exit? |
| Author | : | dljone9 dljone9@os2world.com |
| Date | : | 15 Sep, 2005 on 18:04 |
| Thanks so much for your suggestions; And thanks to Daniel for letting me use this forum "ftp target.com < ftpcmds > ftplogs" Where ftpstat contains non-zero in the event of failure. |
| Subject | : | Re:how do you get return codes from os/2 ftp like m/f (exit? |
| Author | : | warpcafe warpcafe@yahoo.de |
| Date | : | 15 Sep, 2005 on 18:41 |
Hi Zac,
...well, that's almost what I suggested... but it doesn't work? Keeping fingers crossed... |