Re: I need help!!



Starkey2600@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.

000010 IDENTIFICATION DIVISION.
000040 PROGRAM-ID. PRD009SR.
000070*
000100* THIS PROGRAM
000130* PRINTS ITEMS IN INVENTORY WITH NO HISTORY
000160* FINISH GOODS INVENTORY
000190 AUTHOR. BPS COMPUTER SERVICE.
000220 DATE-WRITTEN. 840618.
000250 ENVIRONMENT DIVISION.
000280 CONFIGURATION SECTION.
000310 SOURCE-COMPUTER. RMC.
000340 OBJECT-COMPUTER. RMC.
000370 INPUT-OUTPUT SECTION.
000400 FILE-CONTROL.
000430 SELECT MASTER ASSIGN TO RANDOM,
000460 "/usr/jlw/datafiles/FGINVMST"
000490 ORGANIZATION IS INDEXED,
000520 ACCESS IS DYNAMIC,
000550 RECORD KEY IS MAST-KEY1,
000580 FILE STATUS IS FS.
000760 SELECT PRINTFL ASSIGN TO PRINT, "PRINTER".

In addition to the COMP-3 data problem that Arnold mentioned, the file is
INDEXED. This type of file is proprietary to the compiler used. Usually, in
an INDEXED file, data records are interspersed with control information and
pointers to other records. This type of layout will make sense only to
another program using the same defintions and compiler.

The compiler provider MAY have utilities to read the file and generate a
more friendly format - such as ordinary sequential. If you can overcome that
hurdle, then you'll only have to deal with the COMP-3 data problem.

COMP-3 is also vendor-defined, that is, there is no "standard" definition of
the data layout.

Good luck - you'll need it.

Hint: You've got virtually no hope if you attack the problem with JAVA.


.



Relevant Pages

  • Re: Writing a structure
    ... Use a binary file and dump the binary representation of the ... > compiler, on the same platform. ... shared binary data files between 68k and SPARC. ...
    (comp.lang.c)
  • Re: storing dataset
    ... The CSV file format is convenient and widely ... and then back again when reading them is a big pain. ... binary file, you cannot be sure even that the same source code ... compiled with a different compiler or even a different version of the ...
    (microsoft.public.dotnet.framework)
  • Re: how to insert unique ID into binary file that created after compilation?
    ... >>how can i insert unique ID into binary file (that created by compiler)? ... >and RCS or CVS will expand it for you. ... Balmer Consulting ...
    (comp.lang.c)
  • Re: Writing a structure
    ... Use a binary file and dump the binary representation of the ... >> compiler, on the same platform. ... Dan Pop ...
    (comp.lang.c)