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 |
wht r the requirements for writing a cobol-db2 pgm ?
How does a cursor work?
what is the differences between spufi and qmf and which is better?
4 Answers Accenture, Cap Gemini,
What is copy pending and check pending in db2?
In cursor program perform para varying until 1 by 1 fetch para cursor------close para in the blank what will come for confirming in the database?
What is the SQL Communications Area and what are some of its key fields?
Mention data types used in db2 ?
What is isolation level in db2?
what is the certification that has a good value for a practioner in mainframes but not habving much knowledge on db2 related stuff?
Describe major components of db2?
Can one database have multiple instances?
A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cobol-db2 program. How should I declare my local input file variable or any suggestion?