General information
Category:
Coding, syntax & commands
I had to solve a very similar problem extracting data from a Microfoucs Cobol .idx file. This was a Y2K project in which we rewrote a COBOL system in VFP.
These hints may help.
You will need a hexadecimal editor to examine the contents of the file.
1. Regarding numeric fields:
Each byte of the field represents two decimal digits of the mantissa of the number. The rightmost hexadecimal digit represents the sign. e.g. a value in HEXADECIMAL notation looks like:
00 17 50 0C
This represents the DECIMAL number 17500
The last digit in the hexadecimal number determines the sign
C for positive, D for negative.
The interpretation of where the decimal point goes depends on how the field was declared.
The above field was declared with
C-FEE PIC S9(5)V99 COMP-3.
and thus it has 2 decimal places, so the above hex number represents
+175.00
2. What if you don't have the FD's ?(I didn't either). I did have the compiled COBOL program which provided functions to view data. I could for example look at a transaction with the COBOL program and note that the fee was $175.00. Then I found the record and field in the actual file using a hex editor, noted the offset from the beginning of the record. In this way I was able to deduce the structure of the .idx file. This is admitedly laborious and a last resort, but it works if you can't locate the COBOL source and can't decompile the executable program.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only