-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Describe the bug
We are able to convert the normal ebcdic files to ascii using cobrix. But when we tried to convert packed values (Ex: PIC S9(18)V USAGE COMP-3.) to ascii it is giving an error. Please help me with this
Schema file:
******************************************************************
* COBOL DECLARATION FOR TABLE XXXYY00 *
******************************************************************
01 XXXYY00.
10 FIELD-ID1 PIC S9(4) USAGE COMP.
10 FIELD-ID2 PIC S9(9) USAGE COMP.
10 FIELD-ID3 PIC S9(18) USAGE COMP.
10 FIELD-ID4 PIC S9(9) USAGE COMP.
10 FIELD-ID5 PIC S9(18)V USAGE COMP-3.
10 FIELD-ID6 USAGE COMP-2.
******************************************************************
* THE NUMBER OF COLUMNS DESCRIBED BY THIS DECLARATION IS 6 *
******************************************************************
ERROR LOG:
Exception in thread "main" java.lang.AssertionError: assertion failed
at scala.Predef$.assert(Predef.scala:156)
at za.co.absa.cobrix.cobol.parser.antlr.ParserVisitor.visitPrimitive(ParserVisitor.scala:769)
at za.co.absa.cobrix.cobol.parser.antlr.ParserVisitor.visitPrimitive(ParserVisitor.scala:43)
at za.co.absa.cobrix.cobol.parser.antlr.copybookParser$PrimitiveContext.accept(copybookParser.java:2902)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
at za.co.absa.cobrix.cobol.parser.antlr.copybookParserBaseVisitor.visitItem(copybookParserBaseVisitor.java:408)
at za.co.absa.cobrix.cobol.parser.antlr.copybookParser$ItemContext.accept(copybookParser.java:3135)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
at za.co.absa.cobrix.cobol.parser.antlr.ParserVisitor.visitMain(ParserVisitor.scala:446)
at za.co.absa.cobrix.cobol.parser.antlr.ANTLRParser$.parse(ANTLRParser.scala:81)
at za.co.absa.cobrix.cobol.parser.CopybookParser$.parseTree(CopybookParser.scala:216)
at za.co.absa.cobrix.cobol.reader.FixedLenNestedReader.loadCopyBook(FixedLenNestedReader.scala:107)
at za.co.absa.cobrix.cobol.reader.FixedLenNestedReader.(FixedLenNestedReader.scala:58)
at za.co.absa.cobrix.spark.cobol.reader.FixedLenTextReader.(FixedLenTextReader.scala:53)
at za.co.absa.cobrix.spark.cobol.source.DefaultSource.createTextReader(DefaultSource.scala:88)
at za.co.absa.cobrix.spark.cobol.source.DefaultSource.buildEitherReader(DefaultSource.scala:74)
at za.co.absa.cobrix.spark.cobol.source.DefaultSource.createRelation(DefaultSource.scala:59)
at za.co.absa.cobrix.spark.cobol.source.DefaultSource.createRelation(DefaultSource.scala:47)
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:318)
at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:223)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:211)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:178)
To Reproduce
Steps to reproduce the behaviour OR commands run:
- Go to '...'
- Click on '....'
- Enter value '...'
- See error
Expected behaviour
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.