I have a small program I am working on to help with a data conversion that needs to be done soon(tm). The program compiled fine on Thursday (albeit with a bug), but in fixing the bug and re-compiling this morning the SQL precompiler rejects the compile citing the following error:
"SQL0312 ... Position 52 Variable FLTDATA not defined or not usable."
Which is complaining about line 255:
"EXEC SQL FETCH flexConv3 INTO :FLTDATA;"
(note that flexConv3 is a cursor declared from a host variable via a PREPARE statement.)
I am certain that the FLTDATA variable/field is defined clearly at the top of the program, and there are no scope problems such as different procedures/subroutines/source members involved:
"D FLTDATA S 32767A VARYING"
I tried to re-compile the program from Thursday's source and I get the same problem. The only change since thursday was an i o/s (os400/iSeries/etc.) upgrade to v6r1. Does anyone know what changes were introduced that cause the above FETCH statement to fail to recognise the variable declaration?