Using standard JRecord you can not get the original Cobol length, the cobol details get simplified.
Longer term I will bring more cobol information through.
Currently your options are:
Calculate it. This will not be completely accurate. For Comp3 it is
(field.getLen() + 1) * 2 - field.getDecimal()
Hi,
I have a COMP-3 field defined by this line:
BIYDCOMI-IMPCOC PIC S9(13)V9(02) COMP-3.I want to get the integer part of the unpacked length (13), or at least the total unpacked length (15).
If i call the getLen() method of FieldDetail i get the packed length (8) instead of the unpacked length.
How can i get the unpacked length from JRecord?
Thanks so much in advance,
Juan Miguel.
Using standard JRecord you can not get the original Cobol length, the cobol details get simplified.
Longer term I will bring more cobol information through.
Currently your options are:
Calculate it. This will not be completely accurate. For Comp3 it is
(field.getLen() + 1) * 2 - field.getDecimal()
Use CobolSchemaReader
The
schemaDetailswill hold the completeCobol Item Treewith all the Cobol and JRecord details.With CobolSchemaReader you get all the Cobol information:
becomes:
Note: CobolSchemaReader does not support split on redefines.
The CobolToXml and CobolToJson both extend CobolSchemaReader
Last edit: Bruce Martin 2016-10-24