cobrix
cobrix copied to clipboard
multi segment parse
Hi @yruslan
I have multi segmented binary file and able to parse it, if single segment column present. How do I parse multi segmented file with two segment columns present ?
ex: copybook
01 MASTER-DATA.
05 KEY-TYPE PIC X(01).
05 KEY-IND PIC X(01).
* KEY=A AND IND=0
05 KEY-A0-REC.
10 DATA-FIELDS PIC X(998).
*KEY =B AND IND=0
05 KEY-B0-REC REDEFINES KEY-A0-REC.
10 DATA-FIELDS PIC X(998).
*KEY= 'A'-'F' AND IND=1
05 KEY-01-REC REDEFINES KEY-B0-REC.
10 DATA-FIELDS PIC X(998).
* KEY = 'A-F' AND IND=2
05 KEY-02-REC REDEFINES KEY-01-REC.
10 DATA-FIELDS PIC X(998).
Here segment ids are key-type and key-ind.
Hi, sorry for the late reply. You can use "redefine-segment-id-map" options as described here: https://github.com/AbsaOSS/cobrix#automatic-segment-redefines-filtering