Re: I need help!!



On Jun 15, 7:13 pm, "Starkey2...@xxxxxxxxx" <Starkey2...@xxxxxxxxx>
wrote:
On Jun 15, 3:33 pm, Arnold Trembley <arnold.tremb...@xxxxxxxxxxxxxxxx>
wrote:



Starkey2...@xxxxxxxxx wrote:
Hey everyone, I'm having issues trying to pull data from a fixed
length binary file from a COBOL program that was written a long, long
time ago. I have the source file, I have the data file, I found which
actual "program" writes to the binary file, I opened the source for
that program and found what appears to be copybook data. I've been
trying to use the java based record editor program on sourceforge to
extract the data, but as of now I'm so lost. Could someone please
help me out?

Here is a piece of the source file containing what I think is copybook
info.
(snip)

There are no copybooks in the sample code, but there are two record
layouts for the "master" file. The record layout contains several
numeric fields defined as "comp-3", which is normally IBM packed
decimal format, especially since they all have an odd number of
digits. Each byte has two BCD digits in it, except for the rightmost
byte which has one digit and 4-bit sign. For example, the three digit
number 123 would be stored in comp-3 format as two bytes, with
hexadecimal value X'123F' or X'123C', depending on whether it is
unsigned or signed positive.

Unless you have a specific routine for comp-3 data in Java, it will be
difficult to translate those numeric fields.

--http://arnold.trembley.home.att.net/

Wow, I had no idea this was going to be that difficult. I must say,
this is really overwhelming indeed. Are there any ideas of how I can
get this data out to a flat file, i.e CSV?

Oh, and when I mentioned Java, I didn't mean I was doing it "with"
java, I'm using Record Editor, it's a free and open source alternative
to NetCobol, found at http://record-editor.sourceforge.net/ . Will
this software get me anywhere?

.



Relevant Pages

  • Re: I need help!!
    ... length binary file from a COBOL program that was written a long, ... decimal format, especially since they all have an odd number of ... Each byte has two BCD digits in it, ... java, I'm using Record Editor, it's a free and open source alternative ...
    (comp.lang.cobol)
  • Re: I need help!!
    ... length binary file from a COBOL program that was written a long, ... numeric fields defined as "comp-3", ... Each byte has two BCD digits in it, ...
    (comp.lang.cobol)
  • Re: Beginner Problem - system.out.print
    ... that was only my second java class (so this is going to be SO ... Digits application ... public static void main{ ... If you look through the Java documentation, ...
    (comp.lang.java.programmer)
  • Re: Anime genre: The disaffected/disenchanted office worker.
    ... Dunno how that follows - up till 2001, I was at double digits an hour, ... of Java, 4 years of PHP, etc" that is in demand, I got side-tracked ...
    (rec.arts.anime.misc)
  • Re: I need help!!
    ... length binary file from a COBOL program that was written a long, ... numeric fields defined as "comp-3", ... decimal format, especially since they all have an odd number of ... Each byte has two BCD digits in it, ...
    (comp.lang.cobol)