cobrix icon indicating copy to clipboard operation
cobrix copied to clipboard

multi segment parse

Open sree018 opened this issue 3 years ago • 1 comments

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.

sree018 avatar Apr 08 '22 17:04 sree018

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

yruslan avatar May 05 '22 11:05 yruslan