dbTalk Databases Forums  

Some Flat File Records Missing Carriage Return

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Some Flat File Records Missing Carriage Return in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
cdun2
 
Posts: n/a

Default Some Flat File Records Missing Carriage Return - 11-28-2006 , 09:00 AM






Hello,

I have a series of fixed width flat files where the character length of
each record is 384. The problem is that there is not a carriage return
after the ends of some of the records. There is research under way to
find out just exactly why this happens, but in the meantime, I need to
find a way to discover the occurances of the problem, and insert the
carriage return where it needs to go.

Should I try an Active X script to approach the problem, or explore
possibilities with a batch file? Is there some other way that would be
a better approach?

If you can point me to code resources/sample scripts, that would be
greatly appreciated. Otherwise, please share any suggestions you think
would be helpful.

Thank you for your help!

cdun2


Reply With Quote
  #2  
Old   
Arnie Rowland
 
Posts: n/a

Default Re: Some Flat File Records Missing Carriage Return - 11-28-2006 , 11:05 AM






Fixed Width Import/Export does not rely upon a carriage return, in fact, one
often is not included in the data file.

I suppose that if you are certain that every record is 384 characters in
length, you could have a script that looks at character 385, and if it is
not a char(10), char(13), or char(10)char(13), then insert one.

I would first try to determine of some variation of fixed width import would
work.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


"cdun2" <ChrisDunnMail (AT) gmail (DOT) com> wrote

Quote:
Hello,

I have a series of fixed width flat files where the character length of
each record is 384. The problem is that there is not a carriage return
after the ends of some of the records. There is research under way to
find out just exactly why this happens, but in the meantime, I need to
find a way to discover the occurances of the problem, and insert the
carriage return where it needs to go.

Should I try an Active X script to approach the problem, or explore
possibilities with a batch file? Is there some other way that would be
a better approach?

If you can point me to code resources/sample scripts, that would be
greatly appreciated. Otherwise, please share any suggestions you think
would be helpful.

Thank you for your help!

cdun2




Reply With Quote
  #3  
Old   
cdun2
 
Posts: n/a

Default Re: Some Flat File Records Missing Carriage Return - 11-28-2006 , 12:59 PM



Thank you for your help!

cdun2

Arnie Rowland wrote:
Quote:
Fixed Width Import/Export does not rely upon a carriage return, in fact, one
often is not included in the data file.

I suppose that if you are certain that every record is 384 characters in
length, you could have a script that looks at character 385, and if it is
not a char(10), char(13), or char(10)char(13), then insert one.

I would first try to determine of some variation of fixed width import would
work.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


"cdun2" <ChrisDunnMail (AT) gmail (DOT) com> wrote in message
news:1164726032.063059.281410 (AT) l12g2000cwl (DOT) googlegroups.com...
Hello,

I have a series of fixed width flat files where the character length of
each record is 384. The problem is that there is not a carriage return
after the ends of some of the records. There is research under way to
find out just exactly why this happens, but in the meantime, I need to
find a way to discover the occurances of the problem, and insert the
carriage return where it needs to go.

Should I try an Active X script to approach the problem, or explore
possibilities with a batch file? Is there some other way that would be
a better approach?

If you can point me to code resources/sample scripts, that would be
greatly appreciated. Otherwise, please share any suggestions you think
would be helpful.

Thank you for your help!

cdun2



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.