The DECLARE EXTERNAL CURSOR data manipulation statement identifies an externally-defined global cursor to be used by the application program. You can use this statement only in SQL that is embedded in a program. The DECLARE EXTERNAL CURSOR statement is a CA IDMS extension of the SQL standard.
None required.
►►─── DECLARE static-cursor-name EXTERNAL CURSOR ─────────────────────────────►◄
Specifies the name of a global cursor to be used by the application program. Static-cursor-name must identify a cursor defined by a DECLARE CURSOR statement with the GLOBAL option in another application program that shares an access module with the program containing the DECLARE EXTERNAL CURSOR statement.
Sharing Cursors
For one program (program B) to use a cursor defined in another program (program A):
Identifying an Externally Defined Global Cursor
The following DECLARE EXTERNAL CURSOR statement identifies ALL_EMP_CURSOR as an externally defined global cursor that is used in the application program:
EXEC SQL DECLARE ALL_EMP_CURSOR EXTERNAL CURSOR END-EXEC
|
Copyright © 2014 CA.
All rights reserved.
|
|