-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
za.co.absa.cobrix.cobol.parser.exceptions.SyntaxErrorException: Syntax error in the copybook at line 95: Invalid input '999.9999' at position 95:63 #727
Comments
Hi, thanks for the issue report! I'll try to reproduce it. However, 'VALUE' clauses are ignored by Cobrix. It never validates that the corresponding column has one of the listed values. So you can safely comment or delete line 95 to make it work. For the parser check, could I ask you to send me lines 92-96 of the copybook? I see '1942' there and can't put it into the context. |
Hi @yruslan, Please have a look at the attached image for the lines you asked for from the copybook. |
I confirm this is a parser issue. It doesn't properly handle dot as part of the number. As a workaround you can replace |
The grammar has support for dots in numeric literals: cobrix/cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.g4 Line 229 in ae3fedf
I can reproduce the issue, but it is not obvious how to fix it. So will keep it open for now. |
Hi @yruslan, |
Not at all. Changing that literal won't affect data in any way. Cobrix ignores It is an interesting issue. If the literal contains any digit but |
Hi @tr11 , I hope you are doing well! This issue might be interesting to you too |
Background
I'm using za.co.absa.cobrix:spark-cobol_2.12:2.7.9 Maven Library in Azure Databricks to load Cobol (EBCDIC) files into Databricks. It works very well for all files except one.
Error Message
Py4JJavaError: An error occurred while calling o462.load.
: za.co.absa.cobrix.cobol.parser.exceptions.SyntaxErrorException: Syntax error in the copybook at line 95: Invalid input '999.9999' at position 95:63
CPY File (Copybook)
Question
I'd appreciate some assistance in resolving this issue.
The text was updated successfully, but these errors were encountered: