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

RE: FTP drops spaces at the end of the record



Thanks, I will try it tomorrow, but I am already sure is going to work.
You are always very helpful.
Adriana

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott
Klement
Sent: Friday, July 13, 2007 3:49 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: FTP drops spaces at the end of the record

Hi Adriana,

In FTPAPI, for a "put" request, you control the trim mode by calling the

FTP_trimMode() API.

         FTP_trimMode(sess: *OFF);
         rc = FTP_put(sess: 'remote-file': 'local-file');

This is equivalent to the LOCSITE TRIM command in the IBM client.

For a "get" request, you control this by sending FTP_Quote() to send the

'SITE TRIM 0' (or 1 or 2 to turn trimming on) to control how the server 
trims the record.

         FTP_quote(sess: 'SITE TRIM 0');
         rc = FTP_get(sess: 'remote-file': 'local-file');

This is equivalent to the 'SITE TRIM' command in the IBM client.

Good luck.


Stoicescu, Adriana wrote:
> We FTP a physical file with a record length of 80 to an FTP server. 
> The file created in the FTP server is missing the spaces at the end
> of the record, in other words is translating the fixed record length
> into a variable record length.
> Can anyone advise me what I can do to keep the fixed record length? 
> Any help or documentation reference is appreciated.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-------------------------------------------------------------------------------------
Email Confidentiality Notice and Disclaimer

This email message contains information which may be confidential and 
or legally privileged. Unless you are the intended recipient (or have 
been authorised to receive on behalf of the intended recipient), you 
may not use, copy or disclose to anyone the message or any information 
contained in the message or from any attachments that were sent with 
this email. If you have received this email message in error, please 
advise the sender by email, and delete the message.

All business and transactions of whatsoever nature be it as agent or 
as principal with any party whatsoever shall solely be conducted in 
accordance with our Standard Trading Conditions. These conditions have 
clauses that may limit our liability. A copy of our Standard Terms is 
available on request. When an air waybill or bill of lading or any 
other international consignment note is issued, the conditions that 
apply for such a document will be in addition to our Standard Trading 
Conditions, and for the relative air or sea or other mode of transport 
leg / movement only, they will be paramount.
-------------------------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------