[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnubol: Record delimiter clause and parse order
Tim Josling wrote:
>
> Matthew Vanecek wrote:
> >
> > For shits-n-grins, and personal aggrandizement, I did a little test in
> > MF today at work. Sequential is sequential, with no delimiters,
> > assuming fixed length records. Line sequential is delimited by "\r\n"
> > (hex 0D 0A). At least, that's how they come out on OS/2. So, for fixed
> > length sequential, that's the way I'll do it. Line sequential I'll
> > throw in because it seems that so many non-mainframe compilers seem to
> > advertise support it--"Shop here!! We support MicroFocus' non-standard
> > proprietary extensions!!"
> >
>
> Good.
>
> > > Someone mentioned that fixed vs variable changes the filling of
> > > the records. True.
> > >
> >
> > I also did a couple of variable length writes, so I could get an idea of
> > what MF does with writing variable length files. I'm hard pressed to
> > decipher them, however, even with a hex editor. I've attached it, and
> > the program I used to write it. I can understand the basic
> > structure--starts out at 6 bytes, then increases to 10 bytes, and
> > presumably would add another 4 bytes when rec-len reaches 14, to give 18
> > bytes, and so on. Any pointers on interpreting would be very much
> > appreciated. We don't really use variable length records in files.
> > Actually, we do much more DB work than we do file IO at all...
>
> Something went wrong with the output file you sent. Could you
> send to me direct and call the attachment vr.bin or something
> that cannot be text (ie not vr.txt). - I think the mailing list
> may be messing it up. I remember someone decribing the MF format
> once, I hope I kept it... will have a look. Anyway I am very
> comfortable with your approach....
>
> Tim Josling
>
Here's the whole kit-n-kaboodle, in a tar ball. I looked at the output
again, in light of Fred's message, and it makes pretty good sense. As
for the first 127 bytes in the file, I have no clue, and the MF manuals
don't say anything about it. Might send them a letter asking for the
file layout, but I'm not sure how they would reply.
P.S. Those files were all created in OS/2 Warp, so they'll have the
appropriate (CR/LF) line seperators for that platform.
Another thing I discovered (pursuing a work-related problem), is that
"LINE SEQUENTIAL" does *not* pad lines with trailing spaces. That
really threw me, when I was looking for a 132K file, and only got a 12K
one. :( Probably doesn't matter, with the CR/LF ending on them,
though...
Well, Voyager season finale is on now, so ttyl,
--
Matthew Vanecek
Visit my Website at http://mysite.directlink.net/linuxguy
For answers type: perl -e 'print
$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
*****************************************************************
For 93 million miles, there is nothing between the sun and my shadow
except me. I'm always getting in the way of something...
omsfile.tar.gz