cobrix icon indicating copy to clipboard operation
cobrix copied to clipboard

BBBB in copybook

Open sou-joshi opened this issue 1 year ago • 3 comments

Background

I am trying to read a cool playbook that has "BBBB". Looks something like this. 20240129_221733.jpg

Version of spark - 3.4.1 Scala - 2.12

Cobol_parser - 2.12:2.6.9 Spark-cool- 2.12.:2.6.9

Question

Is it possible to handle such "BBBB" defines? Has anyone come across this before. I currently get syntax error with Invalid input "BBBB" at position ...

sou-joshi avatar Jan 29 '24 16:01 sou-joshi

Hi @sou-joshi, we haven't encountered 'B' in field PIC definitions. Could you send some info or reference to documentation on how it works, please. I couldn't find it easily.

yruslan avatar Jan 29 '24 17:01 yruslan

Thabks for your response @yruslan . Well,not sure what it means. I couldn't find anything either. Tried to remove it. I get duplicate field error

sou-joshi avatar Jan 29 '24 17:01 sou-joshi

Hi, sorry, I've missed the reply. The duplicate error happens when a copybook contains a field having the same name on the same level. Spark does not duplicate names, so the way to workaround it is to rename one of duplicate fields.

yruslan avatar Feb 19 '24 08:02 yruslan