Re: variable size record length file parsing

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Matt Williamson" <ih8spam@xxxxxxxxxxx> wrote in message
news:uZqwjHmlHHA.3704@xxxxxxxxxxxxxxxxxxxxxxx

I need help parsing a file that will have variable sized record lengths.

It depends on the format of the file and how the records are separated.

Each line is between 280-320 chars long and ends with an "X" then a CR/LF.
Here is an example of a few lines from the file:

You pretty much only have two options: using Line Input and working with a
line at a time or reading the file into a byte array (completely or in
chunks) and searching for CRLF yourself, which is pretty much what Line
Input is doing.

Users love delimited, non-fixed-width files because they're easy to work
with for them. As a programmer, I despise them. Fixed-width files rock.


.



Relevant Pages

  • Re: Secure C library
    ... >>where it is a constraint violation if the format parameter is not either ... > Requiring the format string parameter to be const-specified doesn't ... addressing either the glaring holes in *scanfor in the programmer, ... the wrong way to go about making C safer. ...
    (comp.std.c)
  • Re: choice of character for relational division
    ... because the format is so regular. ... system's own tables which were accessible to any programmer, ... level and declarative, or low level and procedural, our code ... If the source unit is small enough, one comment suffices, which means one comment table suffices. ...
    (comp.databases.theory)
  • Re: OT: Why do so many forms require numbers be entered without hyphens or spaces?
    ... or is there some other issue I am overlooking? ... Massively missing the point, which is that the person visiting the page neither knows nor cares, and should not NEED to know or care, what format the designer has chosen for storing the data. ... That is *entirely* the fault of inept coders and designers. ... The alleged "needs" of the program should always be subordinate to the needs, desires, and convenience of the human beings who use it -- and in nearly all cases those alleged "needs" are the direct result of a programmer who either fails to understand that concept, or lacks the wit or imagination necessary to adapt his program to the humans who will use it. ...
    (comp.lang.php)
  • Re: choice of character for relational division
    ... because the format is so regular. ... "Source code checks in but it doesn't check out!") ... system's own tables which were accessible to any programmer, ... level and declarative, or low level and procedural, our code ...
    (comp.databases.theory)
  • Re: floating point arithmetic problems
    ... Programmer people who don't pay ... The VCL could never supply a single set of functions to handle both ... presentation format is designated "default" ... the storage format to be geared towards humans at all. ...
    (comp.lang.pascal.delphi.misc)