View previous topic :: View next topic |
Author |
Message |
manojvoona Beginner
Joined: 05 Jan 2006 Posts: 43 Topics: 14
|
Posted: Thu Jan 31, 2008 11:13 am Post subject: CRLF at the end of records |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Thu Jan 31, 2008 11:54 am Post subject: |
|
|
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 |
|
|
manojvoona Beginner
Joined: 05 Jan 2006 Posts: 43 Topics: 14
|
Posted: Thu Jan 31, 2008 12:21 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Thu Jan 31, 2008 12:41 pm Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Jan 31, 2008 1:07 pm Post subject: |
|
|
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 |
|
|
manojvoona Beginner
Joined: 05 Jan 2006 Posts: 43 Topics: 14
|
Posted: Thu Jan 31, 2008 2:36 pm Post subject: |
|
|
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 |
|
|
|
|