Getting this error after compiling an Ideal program:
SQIB500 VERSION: 002 STATUS 140 CMGENQ03-E DVW-related SQL statements must reference a defined resource of the program.
but don't understand what the error is about.
z/OS
Ideal 14.0 ( and above)
The main reason for being unable to understand and correct that error are the Ideal program COMPILE Options being set.
Set following COMPILE Options :
IDE YES
EXD YES
BOD YES
ADV YES
MEL YES
DBCS NO
LSQL YES
REF FULL
PNL FULL
Those Options will display all it is needed to resolve an error. For documentation, see Setting Compile Options and SET COMPILE Command.
Once the Compile Options are set up correctly, the error shows up clearly and in this specific case , the correction was the use of SQL statement "CLOSE C1" instead of "CLOSE CURSOR C1".