You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See code below.
Constant ON is defined as Dcl-C on '1'
SQL code:
EXEC SQL
CREATE INDEX OR_COMMANDS_INDEX_1 FOR SYSTEM NAME CMDOBJI1
ON CMDOBJ (COMMAND_NAME, COMMAND_LIBRARY) RCDFMT CMDOBJR1;
This shows a "Also defined in scope. Should likely be host variable." in VS-Code.
IMO unless a program-defined variable, constant or structure is used as a host variable, embedded SQL statements should not otherwise be scanned for reserved words that match program-defined variables.
To Reproduce
Declare any constant, i.e., On or Off with values '1' / '0' respectively (or variable or constant matching an SQL reserved word.)
In Embedded SQL, use the reserved word (see above code.)
Expected behavior
Expect the parser not to show an error, as the reserved word is part of the SQL statement bounded by EXEC SQL and semi-colon at end of statement.
Screenshots
Environment (please complete the following information):
V7R4 & V7R5, VS-Code latest version as of 12/26/2024
Additional context
The text was updated successfully, but these errors were encountered:
See code below.
Constant ON is defined as Dcl-C on '1'
SQL code:
EXEC SQL
CREATE INDEX OR_COMMANDS_INDEX_1 FOR SYSTEM NAME CMDOBJI1
ON CMDOBJ (COMMAND_NAME, COMMAND_LIBRARY) RCDFMT CMDOBJR1;
This shows a "Also defined in scope. Should likely be host variable." in VS-Code.
IMO unless a program-defined variable, constant or structure is used as a host variable, embedded SQL statements should not otherwise be scanned for reserved words that match program-defined variables.
To Reproduce
Declare any constant, i.e., On or Off with values '1' / '0' respectively (or variable or constant matching an SQL reserved word.)
In Embedded SQL, use the reserved word (see above code.)
Expected behavior
Expect the parser not to show an error, as the reserved word is part of the SQL statement bounded by EXEC SQL and semi-colon at end of statement.
Screenshots
Environment (please complete the following information):
V7R4 & V7R5, VS-Code latest version as of 12/26/2024
Additional context
The text was updated successfully, but these errors were encountered: