Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   FTP doesn't add Carriage Return from VMS to NT? (http://www.velocityreviews.com/forums/t881718-ftp-doesnt-add-carriage-return-from-vms-to-nt.html)

Mike O'Neal 08-08-2003 08:56 PM

FTP doesn't add Carriage Return from VMS to NT?
 
When I try to use NET::FTP to transfer text files from VMS to NT (GET
command using ASCII mode,) FTP will add the Linefeed, but not the
required carriage return. As is clearly stated all over the
newsgroup, NT/2000 requires the CR/LF at the end of each line. VMS
uses neither. Side-note, when I transfer the files in binary, NO line
terminations are added, as expected. I'm using Windows 2000 with the
ActiveState Perl vers 5.8. I've reloaded the W2k system and Perl with
the same results.

I've located what appears to be the module that performs the transfer
at perl\lib\net\ftp\A.pm but it seems to substitute \n with 015 and
012. I would have expected 013 and 010 (decimal for CR/LF) so now I'm
really confused. Changing them makes no difference, so I guess I'm
way off base.

Anyone have suggestions why I'm not getting my CR/LF as expected?

James Willmore 08-09-2003 05:04 AM

Re: FTP doesn't add Carriage Return from VMS to NT?
 
<snip>
> Anyone have suggestions why I'm not getting my CR/LF as expected?


I posted a suggestion on this issue within the last 3 weeks. Plus,
someone else responded that the issue appears to lie with W2K.

The thread has the subject:
FTP in ASCII mode from UNIX to NT

Same type of issue - line endings fouled.

HTH

Jim

Mike O'Neal 08-10-2003 05:20 AM

Re: FTP doesn't add Carriage Return from VMS to NT?
 
James Willmore <jwillmore@cyberia.com> wrote in message news:<20030809010631.315ab36d.jwillmore@cyberia.co m>...
> <snip>
> > Anyone have suggestions why I'm not getting my CR/LF as expected?

>
> I posted a suggestion on this issue within the last 3 weeks. Plus,
> someone else responded that the issue appears to lie with W2K.
>
> The thread has the subject:
> FTP in ASCII mode from UNIX to NT
>
> Same type of issue - line endings fouled.
>
> HTH
>
> Jim


Jim, I read your issue, and if it's notepad you need to read it in,
just use Wordpad! Voila, problem solved, since it is content to use
LF as a terminator. My problem is proprietary software that NEEDS the
expected CR/LF. I know I can post-process the files, but there's a
bunch and I'd like a better solution if possible.

Does anyone know if the "A" module I mention above is the right place,
or perhaps elsewhere?

Jay Emm Dee 08-12-2003 02:38 AM

Re: FTP doesn't add Carriage Return from VMS to NT?
 
I hope the confusion over 012 and 015 v. 10 and 13 has been
cleared up. They sre both values for CR and LF - in octal and
decimal.

Mike O'Neal wrote:
> James Willmore <jwillmore@cyberia.com> wrote in message news:<20030809010631.315ab36d.jwillmore@cyberia.co m>...
>
>><snip>
>>
>>>Anyone have suggestions why I'm not getting my CR/LF as expected?

>>
>>I posted a suggestion on this issue within the last 3 weeks. Plus,
>>someone else responded that the issue appears to lie with W2K.
>>
>>The thread has the subject:
>>FTP in ASCII mode from UNIX to NT
>>
>>Same type of issue - line endings fouled.
>>
>>HTH
>>
>>Jim

>
>
> Jim, I read your issue, and if it's notepad you need to read it in,
> just use Wordpad! Voila, problem solved, since it is content to use
> LF as a terminator. My problem is proprietary software that NEEDS the
> expected CR/LF. I know I can post-process the files, but there's a
> bunch and I'd like a better solution if possible.
>
> Does anyone know if the "A" module I mention above is the right place,
> or perhaps elsewhere?



Alan J. Flavell 08-12-2003 09:00 AM

Re: FTP doesn't add Carriage Return from VMS to NT?
 
On Mon, Aug 11, Jay Emm Dee blurted out atop a fullquote:

> I hope the confusion over 012 and 015 v. 10 and 13 has been
> cleared up.


I didn't see any such confusion anywhere in what you quoted.

I'd say that whatever confusion there might have been before you
posted, could only have been made worse by your posting.

The killfile awaits.

Mike O'Neal 08-12-2003 07:37 PM

Re: FTP doesn't add Carriage Return from VMS to NT?
 
I have the solution, at least for my situation! This fix comes with
no warranty, expressed, implied or otherwise, but for those who
experience the problem I related (carefully go back and read my
original problem,) this seems to resolve it. I have only tried this
with version 5.8.0, so it may work differently or not at all with
other versions. It may not even work with this version, so don't
trust me...

Locate the A.pm module in the perl\lib\net\FTP directory on the pc.
Comment out the (octal) substitution line (it's the only one like it)
as follows:

# $readbuf =~ S/\015\012/\n/sgo;

It appears that this substitution is not needed and is causing the
trouble. I can now transfer ASCII files from VMS systems to my Win2K
box, and the CORRECT CR/LF is present on the Windows systems. Hurah!
Remember, use this fix at your own risk, since I don't know what I'm
talking about.


All times are GMT. The time now is 04:07 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.