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

RE: TESTPUT



Sender: "Shannon ODonnell" <sodonnell@xxxxxxxxxxxxxxxxx>

Here's the code, with the trim.  I don't see why this does not work:

The first ftp_put is using a path name (the path is the same as the one hard
coded on the second ftp put).

The first one does not work, and the second one does.

RPath1  and  CPath1 are both 256 A.

Very curious.

0                                                                         
0  * Put the file on the remote server                                    
0 c                   if        ftp_put(sess:                             
0 C                             %trim(RPath1):                            
0 C                             %trim(CPath1)) < 0                        
1  **                                                                     
0 c                   if        ftp_put(sess:                             
0 C                             '/QSYS.LIB/SOCKETS.LIB/WORKFILE1.FILE':   
0 C                             '/QSYS.LIB/SOCKETS.LIB/WORKFILE1.FILE')    


Shannon O'Donnell

 


-----Original Message-----
From: owner-ftpapi@xxxxxxxxxxxxx [mailto:owner-ftpapi@xxxxxxxxxxxxx] On
Behalf Of michael@xxxxxxxxxxxxxxxxxx
Sent: Thursday, January 20, 2005 12:10 PM
To: ftpapi@xxxxxxxxxxxxx
Subject: RE: TESTPUT

Sender: michael@xxxxxxxxxxxxxxxxxx

Even though you mentioned trimming, I know that I've needed to do a trim on
the variable when I use it for a path or a name. That 256 byte name with 10
characters and 246 blanks, especially enclosed in quotes, would be seen as a
'real' file or path name.


> -------- Original Message --------
> Subject: TESTPUT
> From: "Shannon ODonnell" <sodonnell@xxxxxxxxxxxxxxxxx>
> Date: Thu, January 20, 2005 12:40 pm
> To: ftpapi@xxxxxxxxxxxxx
> 
> Just started to take a look at FTPAPI  and I am very impressed. Scott 
> did an amazing job with this.
>  
> Quick question..when I tried the TESTPUT sample program, it worked 
> very well when I hardcoded a remote and local path name.
>  
> However, when I attempt to use a variable for those paramaters, I 
> always get a "No Such File or Directory" error message.  I've tried 
> adding an apostrophe around both ends of the path.
> I've tried appending a null to it, and of course, I trim all the 
> extraneous garbage from the variable that may have been passed along 
> with it on the call to the program.
>  
> I can't figure out why a hard coded path works but using a variable 
> for the path doesn't.
>  
> No doubt it's something very basic I'm missing here, but I can't seem 
> to figure it out.
>  
> Any suggestions on things I can try?
>  
> The variables are defined as 256A, btw.
>  
> Shannon O'Donnell

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