[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Transfering SAVF by FTP-APIs
Scott - when using interactive FTP I did this:
230 SJL logged on.
OS/400 is the remote operating system. The TCP/IP version is "V5R1M0".
250 Now using naming format "0".
257 "SJL001" is current library.
> quote site namefmt 1
250 Now using naming format "1".
> bin
200 Representation type is binary IMAGE.
> put splf.savf zzzz.savf
227 Entering Passive Mode (10,0,0,170,55,0).
150 Sending file to member ZZZZ in file ZZZZ in library SJL001.
250 File transfer completed successfully.
392832 bytes transferred in 0.170 seconds. Transfer rate 2311.839 KB/sec.
To delete it, I have to do this:
> delete zzzz.file
250 File ZZZZ in library SJL001 deleted.
When SJL001 is my current library -
This works:
> put splf.savf /tmp/splf.savf
227 Entering Passive Mode (10,0,0,170,168,7).
150 Sending file to /tmp/splf.savf
250 File transfer completed successfully.
392832 bytes transferred in 0.125 seconds. Transfer rate 3142.656 KB/sec.
And this works:
> put splf.savf '/tmp/splf.savf'
227 Entering Passive Mode (10,0,0,170,231,122).
150 Sending file to /tmp/splf.savf
250 File transfer completed successfully.
392832 bytes transferred in 0.125 seconds. Transfer rate 3142.656 KB/sec.
And this works:
> dir /qsys.lib/sjl001.lib/splf.savf
200 Representation type is ASCII nonprint.
227 Entering Passive Mode (10,0,0,170,30,191).
125 List started.
QPGMR 413696 05/26/03 00:29:59 *FILE SPLF.SAVF
250 List completed.
200 Representation type is binary IMAGE.
But this fails:
> put '/QSYS.LIB/SJL001.LIB/SPLF.FILE' '/tmp/SPLF.FILE'
File name format not valid. Use the format: library/file.member or
file.member.
And this fails:
> put '/QSYS.LIB/SJL001.LIB/SPLF.SAVF' '/tmp/SPLF.SAVF'
File name format not valid. Use the format: library/file.member or
file.member.
And the message implies that I have NAMEFMT set to 0,
but you can see from above that I explicitly set it to 1:
Message ID . . . . . . : TCP1095 Severity:. . . . . . . : 10
Message . . . . : File name format not valid. Use the format:
library/file.member or file.member.
Cause . . . . . : The file name specified is not valid with NAMEFMT set
to
0. For more information on file names used by FTP, type HELP FILENAME and
press Enter.
Recovery . . . : Try the subcommand again, specifying a valid file
name.
- Steve
----- Original Message -----
From: "Scott Klement" <sk@xxxxxxxxxxxxxxxx>
To: "HTTPAPI and FTPAPI Projects" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, February 14, 2007 11:34 AM
Subject: Re: Transfering SAVF by FTP-APIs
> Hello Werner,
>
>> P$LocFile = `/QSYS.LIB/SAVLIB.LIB/TEST.SAVF'
>>
>> If FTP_Put(fd:%trimr(p$RmtFile):%trimr(p$LocFile)) < *zeros;
>
> The error message means that it can't find a file with the name you've
> given. And, I agree with FTPAPI... the file name you've given in
> P$LocFile doesn't look correct to me.
>
> You can check to see if the file exists by typing the following i5/OS
> command:
>
> WRKLNK '/QSYS.LIB/SAVLIB.LIB/TEST.SAVF'
>
> I think you'll see that there's no file with this name. It appears that
> you've used the file's attribute (instead of it's object type) as the
> extension. You might try specifying this instead:
>
> WRKLNK '/QSYS.LIB/SAVLIB.LIB/TEST.FILE'
>
> If you're able to see the file this way, then change your RPG code to
> look like this, instead:
>
> P$LocFile = `/QSYS.LIB/SAVLIB.LIB/TEST.FILE'
>
> Hope that helps...
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------