plegall has asked for the wisdom of the Perl Monks concerning the following question:
My EBCDIC and COBOL skills are very low, I'm new to this old technology.
I have some COBOL records EBCDIC encoded files. Each file is a list of records. I want to convert it into a Perl data structure, perform some transformations on fields, convert back to COBOL data structure and EBCDIC encoding.
I've found the Convert::EBCDIC CPAN module of course, but the COBOL record definition is not obvious for me : I don't understand how to jump from the COBOL definition to the unpackeb pattern :-/ Prior to this field extraction, I don't understand how to extract lines from the file !
My COBOL definition is:
01 BCOM. 05 FILLER-ASCII PIC X(292). 05 FILLER-EBCDIC1 PIC 9(8) COMP. 05 FILLER-EBCDIC2 PIC 9(8) COMP.
what should the pattern be to unpack fields?
Convert::EBCDIC module on CPAN
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: EBCDIC and COBOL records
by Corion (Patriarch) on Jul 09, 2008 at 13:54 UTC | |
by plegall (Initiate) on Jul 11, 2008 at 11:26 UTC | |
by Corion (Patriarch) on May 07, 2020 at 12:44 UTC | |
Re: EBCDIC and COBOL records
by NetWallah (Canon) on Jul 09, 2008 at 17:47 UTC | |
Re: EBCDIC and COBOL records
by Aim9b (Monk) on Jul 10, 2008 at 19:10 UTC | |
by plegall (Initiate) on Jul 11, 2008 at 12:44 UTC | |
by Aim9b (Monk) on Jul 14, 2008 at 12:14 UTC | |
Re: EBCDIC and COBOL records
by Anonymous Monk on Oct 14, 2011 at 15:47 UTC |