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

Declare procedure with user defined type #1235

Closed
maxime645 opened this issue Jan 21, 2019 · 0 comments
Closed

Declare procedure with user defined type #1235

maxime645 opened this issue Jan 21, 2019 · 0 comments
Assignees
Labels
Bug User Visible Visible by the end user. Useful to priorize issue

Comments

@maxime645
Copy link
Contributor

When you try to generate the follong lines of code :

       IDENTIFICATION DIVISION.
       PROGRAM-ID. TCOZBMX0.
      
       data division.
       working-storage section.
      
       01 ErrorKey  typedef strict public
                    PIC S9(5) COMP-5.
      
       procedure division.
      
       declare procedure GetNode public
           input    eKey  type ErrorKey
           output   errNode pointer
                    rc type ReturnCode
                    .
       procedure division.
           goback
           .
       end-declare.
      
       END PROGRAM TCOZBMX0.

You are getting the following error message :

Fail to decode the generate Cobol source code => The Generated Cobol document will not be updated!

The present problem seems to be linked to the fact that the typedef is writen in two lines and used as an argument of a procedure declaration.
If the typedef ErrorKey was written in one line or was a structured variable, the program would have generate itself correctly.

Expected behavior
The parser should be able to recognise that the typedef does continue on the following line.

@smedilol smedilol added User Visible Visible by the end user. Useful to priorize issue and removed Error labels Jan 22, 2019
@maxime645 maxime645 self-assigned this Jan 22, 2019
maxime645 added a commit that referenced this issue Feb 14, 2019
Issue #1235 fix MixedGenerator, expand split separator list with '\n' and '\r'
@maxime645 maxime645 mentioned this issue May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug User Visible Visible by the end user. Useful to priorize issue
Projects
None yet
Development

No branches or pull requests

2 participants