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

Re: FTP_PUT Padding



Sender: Scott Klement <klemscot@xxxxxxxxxxxx>


It's unlikely to have anything to do with passive mode, that just
decides who connects to whom.   If you prefer passive mode, you can
enable with by doing a "callp  FTP_passiv(*ON)" right after you
connect.

FTP_linmod is really only useful if you're doing a FTP_getraw().  It's
(currently) not used at all by FTP_put.

You think FTPAPI is padding the record?  I really doubt that, but I
guess it could be a bug. More likely, the file you're sending already has
the trailing blanks, and FTPAPI is simply preserving them.

It's always been my opinion (though, you're free to disagree) that a file
transfer program's job is to transfer data, not transform it. On the other
hand, it wouldn't be very difficult to add trim capability to FTPAPI if
that's something you think would be useful...

Or, of course, you could use FTP_putraw to do it yourself...

Okay, it's 4:40 in the morning where I live, and I'm starting to ramble on
and on...

I looked at the docs (just now) for IBM's FTP client and it states that
if you send a record based file in ASCII mode, it will trim the trailing
blanks from the record, unless you do a "locsite trim 0" command to turn
that trimming off.  This is, IMHO, strange behavior that isn't part of the
official standard for FTP, and is not implemented on any of the many, many
FTP clients for Unix or Windows that I've used, and it frustrates me, but
I guess I have to live with that.   My client will ALWAYS be compared to
IBM's, since it runs on OS/400...  but I'm rambling again.

Here's what you should do:

1) Take a look at the file, see if it's a fixed record file and if the
      records in question have blanks at the end of the record.

2) Assuming that they do, think about whether FTP_putraw would be worth
      using for you, or if it's too much work.

3) Tell me whether I should add a trim function to FTPAPI.



On Sun, 20 Oct 2002, Andy Youens wrote:
>
> I'm using ftp_put to transmit a file to a Stratus machine (OS is VOS??),
> it seems the file is padded with blanks at the end of each record.
>
> If I use a manual FTP session to transmit the file, there is no padding.
>
> Looking at the log, the only differences I can see is the manual
> transmit is using passive mode.  I've tried this with FTPAPI with no
> joy.
>
> I've also tried the various line modes as well.
>
> The 2 logs are shown below, if it helps.
>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------