Eventually, I've managed to come to a solution to this problem ;-)

I rewrote the PL/SQL block which contains the cursor, into the following form:

EXEC SQL DECLARE curs1 CURSOR FOR
select [.....] (the same stuff here !!!)

EXEC SQL OPEN curs1;
nrrec = 0;
i = 0;
for (;
{
EXEC SQL FETCH curs1 INTO :vv_pretunitval[i], :vv_pretunit[i], :vv_reducere[i] [.... and similar stuff further] ;
if (sqlca.sqlerrd[2] - nrrec <= 0)
break;
else
{
nrrec = sqlca.sqlerrd[2];
i++;
}
}
EXEC SQL CLOSE curs1;

As you can all see, the clue was to fetch those fields into the vectors directly (:vv_pretunit[i] and the like).

The PRO*C manual from Oracle sugests some other form of writing the FETCH command (namely, without the [i] part for each vector), but it didn't work for me, and this one does ....

That's all.

Cornel.