Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expandPic failing when expanding virtual decimals #102

Closed
labiraus opened this issue Jun 14, 2019 · 2 comments
Closed

expandPic failing when expanding virtual decimals #102

labiraus opened this issue Jun 14, 2019 · 2 comments

Comments

@labiraus
Copy link

If a .cob file has a pic with two sets of braces in it, if either set of braces has more than one digit in it then the parser fails to parse that line and returns an error NOT DIVISIBLE by the RECORD SIZE calculated from the copybook with a byte count less than what should be expected.

Pass: PIC S9(15)V99.
Pass: PIC S9(9)V9(6).
Fail: S9(15)V9(2).

I suspect that this may be something to do with repeatCount in expandPic on line 944 of CopybookParser.scala

@yruslan
Copy link
Collaborator

yruslan commented Jun 14, 2019

Thanks for the bug report. Unable to reproduce in on the current master though. What version of Cobrix are you using?

Added tests to cover these specific cases. Take a look at this commit (5b1338153).
For S9(15)V99 and S9(15)V9(2) the parser produced the same field size (17). The scale and precision are the same as well.

If this is still an issue in the current master, could you please provide the part of the copybook where that happens and parts of layout positions showing the difference of field lengths which should be printed to the log.

@yruslan
Copy link
Collaborator

yruslan commented Jun 26, 2019

Please, check if this is still an issue in 0.5.1.

@yruslan yruslan closed this as completed Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants