Page 1 of 1

declaring working storage variable in cursor

PostPosted: Mon Dec 13, 2010 12:52 pm
by daniel1234
Hi,

is it possible to declare cursor using directly the Working storage Variable.

Ex.
EXEC SQL
DECLARE CR1 CURSOR WITH HOLD FOR
SELECT * FROM Table1
WHERE VAL1 = :WS-VAL1

Re: declaring working storage variable in cursor

PostPosted: Mon Dec 13, 2010 2:11 pm
by GuyC
yes

Re: declaring working storage variable in cursor

PostPosted: Mon Dec 13, 2010 2:15 pm
by NicC
Suggest you read DECLARE CURSOR in the SQL Reference manual where it sepcifically answers your question in plain English.