Re: I need help!!
- From: "HeyBub" <heybubNOSPAM@xxxxxxxxx>
- Date: Fri, 15 Jun 2007 18:13:56 -0500
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.
.
- References:
- I need help!!
- From: Starkey2600@xxxxxxxxx
- I need help!!
- Prev by Date: Re: I need help!!
- Next by Date: Re: Clarification of LOCK clauses in 2002
- Previous by thread: Re: I need help!!
- Next by thread: Re: I need help!!
- Index(es):
Relevant Pages
|