n_i,
I debugged and saw newsqlQuery has no statement , now I have the code below and this is the new error...please advice
SET newQ= 'SELECT COUNT(CLIENT_CD) INTO '|| v_client_cd ||' FROM PRV.ARTPROA WHERE CLIENT_CD ='|| '301;' ;
EXECUTE IMMEDIATE newQ ;
A database manager error occurred.[IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token ";" was found following "CLIENT_CD=client_cd". Expected tokens may include: "END-OF-STATEMENT". SQLSTATE=42601