Gabkin wrote:
> I need to parse a COBOL index file using a perl script.
> I don't know _that_ much about COBOL but it seems the index file is
> written in some kind of binary format, its not ASCII, thats for sure!
>
> Has this been done before?
> Is there an existing library I can use for this?
>
> failing that...
> Does anyone know how COBOL writes its index files and how I could go
> about parsing them with perl?
> Or is there a simple way to read and parse binary style data?
perldoc -f read
perldoc -f unpack
perldoc -f binmode
<http://search.cpan.org/search?mode=all&query=COBOL> gave:
<http://search.cpan.org/~grommel/Convert-IBM390-0.18/IBM390.pm>
"A COBOL EXAMPLE"
<http://www.google.com/search?q=COBOL+%22index+file%22+specification>
<http://myfileformats.com/search.php?cat_id=170&cat_name=Miscellaneous&start =1>
Ryan McFarland (RM-COBOL) Index File layout
Might be helpful.
--
John MexIT:
http://johnbokma.com/mexit/
personal page:
http://johnbokma.com/
Experienced Perl programmer available:
http://castleamber.com/
Happy Customers:
http://castleamber.com/testimonials.html