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

Re: Cannot seem to FTP from QTEMP



Hello,

You didn't say what sort of problem you're having.  The job log excerpt 
that you posted does not show any errors -- it shows messages that are a 
normal part of an FTP transfer.

Therefore, I have to try to guess at what sort of problem you're having.

My guess is that you have an imperfect understanding of how QTEMP works. 
   QTEMP is not a normal library -- it does not work the way a normal 
library would.  Instead, it's a special library that's actually a part 
of a job.  Each time you create a new job on the iSeries (i.e. you sign 
on, you run the SBMJOB command, you run the spawn() API, etc.) a brand 
new, empty, QTEMP library is created to be used by that job.  Jobs 
cannot ever share the same QTEMP -- there's a separate copy for every job.

This isn't a problem for FTPAPI, however. FTPAPI does not create new 
jobs. If you tell FTPAPI to send a file in the current job's QTEMP 
library, FTPAPI will happily do that. In fact, your job log messages 
confirm that it's sending the file to the FTP server.

However, the IBM FTP server that's included with i5/OS does split it's 
work across multiple jobs.  That means that if you upload a file to the 
FTP server (it doesn't matter which client you use, FTPAPI or not, since 
this happens on the server) and upload the file to QTEMP, it'll be in 
the QTEMP of one of the FTP server's many jobs.  If you subsequently try 
to restore objects from the save file, it'll fail because the restore 
command will be running in a different job that has a different QTEMP.

So -- assuming that my *guess* is correct -- your problem is not related 
to FTPAPI.  Instead, it's related to the fact that you're using QTEMP. 
Instead, I suggest using a different library.


chrisholko@xxxxxxxxxxxxx wrote:
> returncode =  ftp_put(session   
> :remotefilename   
> :localfilename);  
> 
> where remotefilename=/QSYS.LIB/QTEMP.LIB/HQD1203080.FILE  
> localfilename=/QSYS.LIB/QTEMP.LIB/HQD1203080.FILE 
> 
> Trying to push a save file between systems.  a command wraps whatever data the user wants sent into a save file, pushes save file to remote and unpacks it.
> 
> I watched both sides, the save file is created on the dest in the QTEMP of the FTP job, used ftp_rmtcmd to do it ...  
> 
> 
> here is what I find in my joblog... seems to indicate I might need .SAVF as part of my local name?
> 15: > PORT 10,28,1,27,173,86                                            
> 15: 200 PORT subcommand request successful.                             
> 15: > STOR /QSYS.LIB/QTEMP.LIB/HQD1203080.FILE                          
> 15: 150-NAMEFMT set to 1.                                               
> 15: 150 Sending file to member HQD1203080 in file HQD1203080 in library 
>   QTEMP.                                                                
> 

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------