On Wed, Aug 23, 2017 at 11:39 AM, Paul Gilmartin
<0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote:
> On Wed, 23 Aug 2017 14:04:13 +0300, venkat kulkarni wrote:
>>
>>So, we are sending text data from mainframe to AIX system for further
>>processing.
>>    ...
>>But when we use SFTP process for transferring the file, we get trailing
>>spaces added in the file after sftp process completion.
>>
> I'm astonished.  I trust sftp to do no data munging.  Are you certain the
> spaces don't exist in the original file before transfer?  Try the command
>     od -tx1 file-name
> on the file before and after transfer.

I'd bet that the old FTP transfer had a site default of
NOTRAILINGBLANKS. This automatically truncates the transferred line
after the last non-blank character. There is no such option, that I
know of, for sftp transfers. The "sed" command could be used before
transferring to remove trailing blanks from the input file. Something
like:

sed -E 's/ *$//;' real-input-file.txt >no-trailing-blanks-file.txt

Then transfer no-trailing-blanks-file.txt, like: sftp
no-trailing-blanks-file user@remote:/dir/ectory/real-input.file.txt

>
> -- gil
>



-- 
If you look around the poker table & don't see an obvious sucker, it's you.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to