[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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
____________________________________________________________
[1]Nutrition
Improve your career health. Click now to study nutrition!
References
1. http://thirdpartyoffers.netzero.net/TGL2242/c?cp=dnLU2pp40BWc0yqBei-PZgAAJ1GQwA_2GHBdcpgjr8pbJkmVAAYAAAAAAAAAAAAAAAAAAADNAAAAAAAAAAAAAAAAAAASQwAAAAA=
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------