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

VALUE clause cannot be specified in conjunction with REDEFINES and for an item having a parent with a VALUE clause #2624

Open
efr15 opened this issue May 10, 2024 · 0 comments
Labels
Bug Cobol User Visible Visible by the end user. Useful to priorize issue

Comments

@efr15
Copy link
Contributor

efr15 commented May 10, 2024

Describe the bug
VALUE clause cannot be specified for:

  1. A REDEFINES item or an item having a parent which is a REDEFINES.
  2. An item having a parent with a VALUE clause.

To Reproduce
(Type)Cobol code that cause the bug :

       01 group0.
          05 group1.
             10 var1 PIC X VALUE 'Y'.
      *      Error1: item is a REDEFINES
             10 var-redef REDEFINES var1 PIC X VALUE 'O'.
          05 group2 REDEFINES group1.
      *      Error1: item's parent is a REDEFINES
             10 var2 PIC X VALUE 'N'.
          05 group3 VALUE 'P'.
             10 group31.
      *      Error2: item has a parent with a VALUE clause
                15 var3 PIC X VALUE 'I'.

Expected behavior
Message from IBM for error1:
A"VALUE"clause was specified for an item that contained, or was subordinate to an item that contained, a"REDEFINES"clause. The"VALUE"clause was discarded.
Message from IBM for error2:
A"VALUE"clause was previously specified for a group containing this item. The"VALUE"clause was discarded for this item.

Technical
Should be done in CrossChecker

How to test automatically
Standard unit tests.

@efr15 efr15 added Bug Cobol User Visible Visible by the end user. Useful to priorize issue labels May 10, 2024
@efr15 efr15 changed the title VALUE clause cannot be specified in conjunction with REDEFINES VALUE clause cannot be specified in conjunction with REDEFINES and for an item having a parent with a VALUE clause May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Cobol User Visible Visible by the end user. Useful to priorize issue
Projects
None yet
Development

No branches or pull requests

1 participant