What is the syntax required for the creation of a cursor?
Answer / prasad
Example For cursor Syntax:
Declare Cursor:
EXEC SQL DECLARE CUST_ITM CURSOR
FOR
SELECT
OWN_CUS_NO,
OWN_CUS_ITM_SUF_NO
FROM
NPJXTII
WHERE SCK_NO = :SCK-
NO
AND SCK_DT = :NPS-ORIG-TRANS-
DT
AND SCK_LN_ITM_SEQ_NO = :SCK-LN-ITM-SEQ-
NO
END-
EXEC.
Open Cursor:
EXEC SQL OPEN CUST_ITM
END-EXEC.
Fetch Cursor:
EXEC SQL FETCH CUST_ITM
INTO :OWN-CUS-NO,
:OWN-CUS-ITM-SUF-NO
END-EXEC.
Close Cursor:
EXEC SQL CLOSE CUST_ITM
END-EXEC.
Is This Answer Correct ? | 12 Yes | 1 No |
What are db2 tables?
How to test SQL -911 error while developing COB-DB2 program
How does one bind 2 versions of a CICS transaction with the same module name in two different CICS regions that share the same DB2 subsystem?
What are the contents of a DCLGEN?
What is the picture clause of the null indicator variable?
How to resolve -803 sql code in DB2?
What is the meaning concurrency in the db2 database?
What is null value in db2?
How to resolve the -305 error code in DB2? And also please let me know, how to resolve the db2 error codes.
How can record locking be achieved in those DB2 versions which do not support it?
What is a correlated sub query?
What is a DB2 plan?