AbsaOSS / AbsaOSS/cobrix

CopyBook Parsing Error

Open
#565 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Scala
Stars
170
Forks
96
Avg merge
57m
Merged PRs (30d)
2

Description

## Describe the bug
Getting CopyBook parsing error .

ERROR ANTLRParser: Syntax error in the copybook: Line 665:29 no viable alternative at input '01RPT-DALY-TOTL-PROM-RCRDEXTERNAL'

## Code snippet that caused the issue

```
dfFin = spark.read.format("cobol").option("copybook", "/cobrix/copybook/copybookpath.TXT")\
.load("/cobrix/data/sourcefilevariablerecordfile")
```

## Expected behavior
Parse copybook and source file and display results in DF

## Context
- Cobrix version:cobol-parser_2.12-2.6.2.jar
- Spark version:3.1.1
- Scala version:3.1.1
- Operating system:Linux

## Copybook (if possible)

02235A 01 REPORTHOLDER-DAILY-TOTAL-RECORD EXTERNAL.
02235A 05 RPT-RCRD-TYPE-ID PIC X(4).
02235A 05 RPT-RCRD-SQNC-CT PIC S9(7)V COMP-3.
05 RPT-KEY-AREA.
10 RPT-CLIENT-NUMBER PIC X(4).
06097A 10 RPT-DOR-RPT-SORT-KEY.
1.006A 15 RPT-DOR-RPT-HIERARCHY PIC X.
1.006A 15 RPT-DOR-RPT-SPA.
1.006A 20 RPT-DOR-RPT-SYSTEM PIC X(4).
1.006A 20 RPT-DOR-RPT-PRIN PIC X(4).
1.006A 20 RPT-DOR-RPT-ENTITY-3 PIC X(4).
1.006A 15 RPT-DOR-RPT-ENTITY-4 PIC 9(5).
1.006A 15 RPT-DOR-RPT-ENTITY-5 PIC 99.
1.006A 15 RPT-DOR-RPT-ENTITY-6.
1.006A 20 RPT-DOR-3-DIGIT-BOOK-CODE PIC 999.
02235A 15 FILLER PIC X(175).
10 RPT-ACCOUNT-NUMBER PIC X(8).
02235A 05 RPT-SPA.

02235A
11021A 01 RPT-DALY-TOTL-PROM-RCRD EXTERNAL PIC X(692).
02235A
02235A 01 RPT-DALY-TOTL-PROM-TABLE EXTERNAL.
02235A 05 CDT-PROM-RCRD-TYPE-ID
02235A PIC X(4).
02235A 05 CDT-PROM-RCRD-SQNC-CT PIC S9(7)V COMP-3.

Attach a small data file that can help reproduce the issue, if possible.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.