che-che4z-lsp-for-cobol
che-che4z-lsp-for-cobol copied to clipboard
SQL include statement is not resolved unless END-EXEC is followed by a period
Description
The period following END-EXEC is optional in most cases. Omitting the period does not appear to cause issues parsing other SQL statements, and no errors or warnings are displayed on the EXEC in question.
Steps to reproduce
Remove the period from the END-EXEC following an include statement
Expected behavior
Copybook is resolved and variables are available to the LSP
Screenshots
Environment
- OS: Windows 10 & Linux
- IDE: VS Code
Additional information
The DB2 for Z/OS manual notes
If the SQL statement appears between two COBOL statements, the period after END-EXEC is optional and might not be appropriate. If the statement appears in an IF…THEN set of COBOL statements, omit the ending period to avoid inadvertently ending the IF statement.
While this implies that the period is required otherwise, it appears to be optional in most cases.