MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP Line Break Problem

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Wed Apr 13, 2005 12:40 pm    Post subject: FTP Line Break Problem Reply with quote

I have been asked to get a file to the mainframe from a Windows machine. The problem is the file is being created with line feeds but no carriage returns so I am losing the line formatting. Does anyone know how to correct this? Note that the file is variable length.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Apr 14, 2005 9:11 am    Post subject: Reply with quote

The only solution I see, other than fixing the file, is to FTP the file, in binary mode, to a dataset allocated with RECFM=VB.

Then, pass the dataset through a data-mapping engine (Gentran, Mercator, Cloverleaf), telling the engine to:

- use the Line Feed (hex '0A') as the segment terminator.

- translate the text from ASCII to EBCDIC.

- write one segment per record to the output, truncating the Line Feed character as it does so.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Apr 14, 2005 9:29 am    Post subject: Reply with quote

I'm not certain I've had the exact problem with FTP you mentioned, but
one way I've dealt with situations like this is to copy the file on the Windows box beforehand using somethng simple like:

type c:\badfile > c:\goodfile

and then upload goodfile. It basically converts Unix format to Windows format. If that doesn't change anything else (tabs, blank lines, unusual characters) then it may work for you.

Or you could get one of the ports of the unix2dos command for win32.
Back to top
View user's profile Send private message Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Apr 14, 2005 10:55 am    Post subject: Reply with quote

Thanks for the reponses. I an going to use WRAPRECORD in the FTP and write a quick program to format the record.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group