cobol2j uses cb2xml to parse copybooks and then transforms it into xc2j with cb2xml2cobol2j.xsl
Several root ( different records ) is well supported in cobol2j. We need to distinguish between redefined records and redefined fields ( or group of fields inside record ) when there is no way to recognize what redefined type to apply.
I simply removed first line ( "01 REC-IDENT." ) and everything went fine. Why? It requires more words ....
Redefinied on first level is implemented differently than deeper redefines: When you have two or more first levels ( not your case in your oryginal file ) like 01 REC-IDENT. ... 01 REC-STH then it is automaticaly recognised as multi-record definition. Sometime only...
Pls try xc2j below and let us know if it works ok for you:
<?xml version="1.0" encoding="UTF-8"?>
<FileFormat ConversionTable="Cp037"
dataFileImplementation="IBM i or z System" distinguishFieldSize="1" newLineSize="0">
<RecordFormat cobolRecordName="DATA-RECORD" distinguishFieldValue="1">.
I think that it can be done based on COMP-3: just parse COMP-6 founded in copybooks similar to COMP-3 so that items based on this has all requires attributes like "usage", "decimal", "display-length" properly set.
Example:
03 SUJ001 PIC 9(6) COMP-6.
now creates: