[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with ftp_put



Sender: Brian@xxxxxxxxxx


OK, I know see a couple of assumptions I have made were incorrect.

I was doing a literal translation from the script method using IBM's FTP
client.

      I was doing a CHGCURLIB instead of a CHGCURDIR.
      Using WRKLNK I was able to verify that the file was TEST.FILE, not
TEST.SAVF.

So, I have changed the program to do a CHGCURDIR and to use "TEST.FILE" and
now I get:
      "Unable to retrieve an object description!  "

Previously  by switching to namefmt 1 and using the .SAVF suffix I could
avoid having to create the target save file before putting it.  Is this no
longer the case?  Do I now have to create a save file on the target AS/400
before doing the put?

Thanks for putting up with me on this.

Brian J. Garland
Vermont Information Processing, Inc.
brian@xxxxxxxxxx



                                                                                                                                
                      Scott Klement                                                                                             
                      <klemscot@xxxxxxx        To:       ftpapi@xxxxxxxxxxxxx                                                   
                      s.com>                   cc:                                                                              
                      Sent by:                 Subject:  Re: problem with ftp_put                                               
                      owner-ftpapi@xxxx                                                                                         
                      e.ods.net                                                                                                 
                                                                                                                                
                                                                                                                                
                      10/18/2002 12:04                                                                                          
                      PM                                                                                                        
                      Please respond to                                                                                         
                      ftpapi                                                                                                    
                                                                                                                                
                                                                                                                                




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
-----------------------------------------------------------------------





-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------