This looks like a Namefmt error which is strange because in your code you set it to 1 (IFS) rather than 0 (legacy QSYS) and the path you are using looks like an IFS path - perhaps something in the change of directory is going amiss to lead the iSeries to think you are pointing at a QSYS library rather than the IFS? Mark Humpage ISeries, Java, .Net, SharePoint FUJITSU NEW ZEALAND P O Box 2640, Christchurch T +64 3 963 7955 M +64 21 284 5167 mark.humpage@xxxxxxxxxxxxxx <mailto:mark.humpage@xxxxxxxxxxxxxx> nz.fujitsu.com <https://webmail.infinity.co.nz/exchweb/bin/redir.asp?URL=http://nz.fujitsu.com> ________________________________ From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx on behalf of ksherbert@xxxxxxxxxxx Sent: Thu 7/01/2010 9:33 a.m. To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx Subject: 501 Unknown extension in database file name I am getting this error: 501 Unknown extension in database file name. I am using the FTPAPI and going iSeries to iSeries. Has anyone run into that and is there a solution. 29: 200 Representation type is binary IMAGE. 29: > SIZE TRUCOM_GT_POS_2009070401022.TMP 29: 500 Subcommand SIZE not valid. 29: > TYPE I 29: 200 Representation type is binary IMAGE. 29: > PORT 172,21,12,9,193,160 29: 200 PORT subcommand request successful. 29: > RETR TRUCOM_GT_POS_2009070401022.TMP 29: 501 Unknown extension in database file name. 29: > TYPE I 29: 200 Representation type is binary IMAGE. 29: > SIZE TRUCOM_GT_POS_2009070401021.TMP 29: 500 Subcommand SIZE not valid. 29: > TYPE I The code is very simple: H Debug H BndDir('QC2LE':'FTPAPI') H DftActGrp(*NO) ActGrp(*CALLER) H Option(*SRCSTMT:*NODEBUGIO) H TruncNbr(*YES) * ******************************************************************* * * Program Name: FTPTRUPOS2 * Creation Date: 01/06/2010 * Author: Ken Sherbert * * Description: * This program will FTP from production to the test environment. * ******************************************************************* * MODIFICATIONS ******************************************************************* * ******************************************************************* D/COPY GSISRC,FTPAPI_H D*-- copy a file from the FTP server:----------------------------------** D copyfile PR 10I 0 D peFd 10I 0 value D peName 8192A options(*varsize) D peNameLen 10I 0 value D todir S 64A varying D fromdir S 64A varying D ftpsession1 S 10I 0 D ftpsession2 S 10I 0 /free todir = '/home/TRU_TEST/POS'; ftpsession1 = ftp_conn('HOST':'USER':'PASSWORD'); ftp_namfmt(ftpsession1:1); ftpsession2 = ftp_conn('HOST':'USER':'PASSWORD'); ftp_namfmt(ftpsession2:1); fromdir = '/home/tru/POS/arc'; exsr getfiles; ftp_quit(ftpsession2); ftp_quit(ftpsession1); *INLR = *ON; begsr getfiles; ftp_chdir(ftpsession1:fromdir); ftp_chdir(ftpsession2:fromdir); ftp_lstraw(ftpsession1:' ':ftpsession2:%paddr('COPYFILE')); endsr; /end-free *--------------------------------------------------------------- * copyfile: copy a file from one server to another *--------------------------------------------------------------- P copyfile B D copyfile PI 10I 0 D peFd 10I 0 value D peName 8192A options(*varsize) D peNameLen 10I 0 value D wwRemote s 256A D wwArchive s 256A D wwLocal s 256A /free wwRemote = %subst(peName:1:peNameLen); wwLocal = todir + '/' + %subst(peName:1:peNameLen); ftp_get(peFD:wwRemote:wwLocal); return *ZERO; /end-free P copyfile E Thanks, Ken Sherbert ____________________________________________________________ Nutrition Improve your career health. Click now to study nutrition! http://thirdpartyoffers.netzero.net/TGL2241/c?cp=dnLU2pp40BWc0yqBei-PZgAAJ1GQwA_2GHBdcpgjr8pbJkmVAAYAAAAAAAAAAAAAAAAAAADNAAAAAAAAAAAAAAAAAAASQwAAAAA= The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, you are asked to respect that confidentiality and not disclose, copy or make use of its contents. If received in error you are asked to destroy this email and contact the sender immediately. Your assistance is appreciated.
<<winmail.dat>>
----------------------------------------------------------------------- This is the FTPAPI mailing list. To unsubscribe, please go to: http://www.scottklement.com/mailman/listinfo/ftpapi -----------------------------------------------------------------------