ALLBASE/SQL Reference Manual (36216-90216)

388 Chapter10
SQL Statements A - D
DESCRIBE
The sqld of sqlda is set to 2, sqlmproc to 2, and sqloparm to 0.
a. If sqldaout.
sqlmproc
<> 0 then, use procedure cursor processing statements to
process multiple row result set(s) from the procedure.
DESCRIBE RESULT cmd USING sqldaresult
.
.
.
DECLARE Dynamic1Cursor CURSOR FOR cmd
OPEN Dynamic1Cursor USING sqldain
.
.
.
FETCH Dynamic1Cursor using DESCRIPTOR sqldaresult
.
.
.
CLOSE Dynamic1Cursor USING sqldaout
.
.
.
b. Else, execute the procedure with both input and output dynamic parameters.
EXECUTE cmd USING DESCRIPTOR INPUT sqldain AND OUTPUT
sqldaout;