Thank you Mike!
The cursor currett is created as follows
CREATE CURSOR curRett (Enabled L,selected L,cd_ar c(20),descrizione C(80),cd_arlotto C(20) NULL,qtaAtt N(18,8) NULL,qtaRilev N(18,8) NULL,qtaRett N(18,8) NULL)
Data are inserted into it with instruction like
INSERT INTO curRett ;
SELECT...