Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > FTP doesn't add Carriage Return from VMS to NT?

Reply
Thread Tools

FTP doesn't add Carriage Return from VMS to NT?

 
 
Mike O'Neal
Guest
Posts: n/a
 
      08-08-2003
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?
 
Reply With Quote
 
 
 
 
James Willmore
Guest
Posts: n/a
 
      08-09-2003
<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
 
Reply With Quote
 
 
 
 
Mike O'Neal
Guest
Posts: n/a
 
      08-10-2003
James Willmore <(E-Mail Removed)> wrote in message news:<(E-Mail Removed) 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?
 
Reply With Quote
 
Jay Emm Dee
Guest
Posts: n/a
 
      08-12-2003
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 <(E-Mail Removed)> wrote in message news:<(E-Mail Removed) 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?


 
Reply With Quote
 
Alan J. Flavell
Guest
Posts: n/a
 
      08-12-2003
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.
 
Reply With Quote
 
Mike O'Neal
Guest
Posts: n/a
 
      08-12-2003
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Carriage Return added during return of large string from class method Xeno Campanoli Ruby 0 02-13-2006 08:39 PM
add carriage return?! Geoff Cox Javascript 9 09-14-2005 09:26 AM
IDS Incident Handling - IEV CTR VMS webspider Cisco 0 11-26-2004 06:22 AM
Net::FTP problems getting files from Windows FTP server, but not Linux FTP Server. D. Buck Perl Misc 2 06-29-2004 02:05 PM
Help: Delete a single carriage return in a file, but not a double carriage return? Steve Anderson Perl Misc 3 06-21-2004 12:48 AM



Advertisments