-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
given
EXEC SQL FETCH SOMETHING INTO :FIELD END-EXEC.
*
IF SQLCODE = 0resulted in
OCESQL* EXEC SQL FETCH SOMETHING INTO :FIELD END-EXEC.
OCESQL CALL "OCESQLStartSQL"
OCESQL END-CALL
*
IF SQLCODE = 0The reason in this case was that FIELD was not contained in the variables visible to the parser (copybook instead of SQL INCLUDE, possibly because of missing support for #91).
The code generation should raise a clear error here "unknown bind variable :FIELD".
... rechecking the code - this happens here:
Open-COBOL-ESQL/ocesql/ppout.c
Lines 656 to 669 in eec3a23
| com_sprintf(buff,sizeof(buff), "OCESQL%5sCALL \"OCESQLStartSQL\"\nOCESQL%5sEND-CALL\n"," "," "); | |
| fputs(buff, outfile); | |
| host_list = list->host_list; | |
| int count = 0; | |
| if(host_list){ | |
| iret = gethostvarianttype(host_list->hostreference, &type, &digits, &scale); | |
| if(iret != 0){ | |
| printmsg("%s:%d\n", host_list->hostreference,iret); | |
| memset(buff, 0, sizeof(buff)); | |
| com_sprintf(buff,sizeof(buff), "E%03d",iret); | |
| printerrormsg(host_list->hostreference, host_list->lineno, | |
| buff); | |
| return; |
and there is indeed an output:
00234:E001:FIELD is not defined in the working-storage !
... but as ocesql still returns 0 and the message is placed to stdout this is easy to miss
Metadata
Metadata
Assignees
Labels
No labels