[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with ftp_put
Sender: Scott Klement <klemscot@xxxxxxxxxxxx>
On Fri, 18 Oct 2002 Brian@xxxxxxxxxx wrote:
>
> Sorry about that. The slash problem is just a typo in the e-mail. I am
> using "/" in the program.
>
> By your response, am I to take it that I should be sending the complete
> path and not just a file name?
No, you should be able to use just the file name, assuming your current
directory is set properly. FTPAPI does not use "name format 0" (i.e.
library/file syntax) and does not search your library list. So, if you
want to send a file called "TEST.FILE" then you need to make sure
your current directory (set with the CHGCURDIR command or chdir() API) is
'/QSYS.LIB/SNDVIPFTP.LIB'
If you can use the full path name, though, it eliminates the possibility
that the problem might be your current directory.
>
> Also, I only get the "not found" error when I only use just the file name
> ("test.savf", or "test").
>
> If I use the full path "/QSYS.LIB/SNDVIPFTP.LIB/TEST.SAVF" I get the
> following error:
> A path name is too long.
Weird. Path names should be able to be MUCH larger than that.
If you go to the command line and do a
WRKLNK '/QSYS.LIB/SNDVIPFTP.LIB/TEST.SAVF' does THAT work?
I have a feeling that the file you're looking for is actually called
'TEST.FILE' not 'TEST.SAVF'
>
> Pressing help on the error says, "The program is expecting a character
> input field with a maximum length of 52." The variable Path is a 52 byte
> character in my program and I only count 33 characters in that text.
>
That sounds like the help text from the RPG DSPLY op-code, rather than the
error message that occurred. :) FTPAPI allows path names up to 256
characters long. OS/400 allows up to 640 chars.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------