Tim wrote:

> I've got some files on our AS/400 that I'm pulling down into Linux and
> I'd like to open up this file and pull out some of the information and
> display it before sending it off.  I'm not sure the best way to go about
> doing this, and am open to suggestions.
> 
> The file is fixed length (289 chr/line if memory serves) and I'd like to
> break it up into the different fields, but I'm really unsure as to how to
> go about doing this.  Each field is also a fixed length, so I'm assuming
> with that information it should be "fairly" simple to do.  I could do this
> fairly easy in perl or for that matter gawk, but I'm not trying to learn
> either of them, but C.  :-) 

If the fields are definitely fixed-length, then the simplest solution
would probably be to use fscanf() with lots of `%<width>s' specifiers.

> Below is one line out of the file (sorry, it wraps in here) and the file
> layout from the AS/400.

Sorry, but this is totally incomprehensible. If you have problems with 
a mailer which wraps stuff, either send the data as an attachment, or
get a better mailer.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to