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 

CRLF at the end of records

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


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Thu Jan 31, 2008 11:13 am    Post subject: CRLF at the end of records Reply with quote

Hi ,

I really need help in this.
We need to send some date ( file ) to a vendor system. Their system is on Unix.

They are expectigng CRLF at the end of each record.
Some how when we transfer the file ( Goes to Unix server through NDM and from their to vendor system through FTP ) the CR is missing.

I mean the vendor says he could see LF but not the CR.
How can I insert CR.

Appreciate your help in advance.

Thanks
Manoj Voona
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Jan 31, 2008 11:54 am    Post subject: Reply with quote

manojvoona,

CRLF is X'0D0A'. you mean to say that the X'0D' is getting translated to something else? Just verify that your file has CRLF before you NDM it and if you do have then you need to check to what it is being translated during the transfer.

If you dont have CRLF at all then run the file thru an utility(DFSORT) and add the CRLF at the end of each record
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
manojvoona
Beginner


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Thu Jan 31, 2008 12:21 pm    Post subject: Reply with quote

Thanks Kolusu,

How do I get to know if the file has CRLF at the end.
the file length is 300 and data is populated uptill 300. will it be after 300 bytes.

Can you help me in writing the DFSORT to insert that feild.

Thanks a lot
Manoj Voona
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Jan 31, 2008 12:41 pm    Post subject: Reply with quote

Quote:
Their system is on Unix. They are expectigng CRLF at the end of each record.


wait a min . As far as I remember UNIX only needs LF , it is WINDOWS which needs both CR and LF. Now if your client is having UNIX why do u need CR in the first place as Unix doesn't expect it to be there.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


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

PostPosted: Thu Jan 31, 2008 1:07 pm    Post subject: Reply with quote

Some Unix (Linux?) systems have the commands dos2unix or unix2dos (or something like that) which are specifically meant to do this function. Maybe you could pipe the file through the unix2dos filter. This may just be a GNU utility, I'm not sure.
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
manojvoona
Beginner


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Thu Jan 31, 2008 2:36 pm    Post subject: Reply with quote

Thanks Kolusu,

Yaah you are right. The vendor system is windows.
They are able to see LF only in the file

We inserted CR using a Syncsort and that worked.

Thanks for all the help. we really appreciate .

Manoj Voona
Back to top
View user's profile Send private message Send e-mail
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