HP3000-L Archives

November 1997, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Sat, 22 Nov 1997 22:20:10 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
Nobody ([log in to unmask]) writes:

>I've downloaded some MPE flatfiles to my PC. Besides Notepad, what's the
best
>way to view them so that all the columns stay aligned when some of the
>fields are binary or computational fields? Even better, how can I view those
fields,
>too? Thanks in advance...

Nobody knows the troubles I've seen trying to do the same thing. Characters
that were intended to be binary, but are now represented as ASCII characters,
can take on any value and thus signal all sorts of unintended behaviors. The
best and easiest thing to do is write a small program in something like
Visual Basic to read your flat files as a series of substrings and print them
to a form, picture box or text box. You can either excise out the binary
sections (which would be the easiest thing) or write conversion routines and
convert the values into ASCII representations of the numeric values (it's a
bit more work, but it's not all that hard).

Shy of doing this (or something similar), no simple editor is going to be of
any value. However, there is one other thing you might try that will get you
to the same point by doing essentially the same thing without having to
resort to writing a program. A great number of PC-based spreadsheets allow
you to define parsing fields so that you may read flat file-based data into a
spreadsheet from fixed-field formatted data (which is essentially what you
have). Define your fields as (for example) field1:1-10; field2:18-24; etc.,
skipping over the binary sections. When your file is subsequently read
(imported) into the spreadsheet, each ASCII field will be read into a
different column -- and they will all be perfectly aligned.

I hope this helps Nobody.

Wirt Atmar

ATOM RSS1 RSS2