SQL
DB-FETCH CUR[SOR] cursorname
... [SENSITIVE|INSENSITIVE]
... [ABSOLUTE number|RELATIVE number|CURRENT|FIRST|LAST|NEXT|PREVIOUS|PRIOR]
... [NEXT ROWSET | FIRST ROWSET | PRIOR ROWSET |
... CURRENT ROWSET | LAST ROWSET |
... ROWSET STARTING AT {ABSOLUTE number | RELATIVE number}]
... [FOR number ROWS]
... [INTO dataname]
01 recordname-ARR.
05 CobolHostVar1-ARR picture occurs row-number times.
05 IND-CobolHostVar1-ARR picture occurs row-number times.
05 CobolHostVar2-ARR picture occurs row-number times.
05 IND-CobolHostVar2-ARR picture occurs row-number times.
…..
05 CobolHostVarn-ARR picture occurs row-number times.
05 IND-CobolHostVarn-ARR picture occurs row-number times.
|
CUR[SOR] cursorname |
Specify cursor. Cursorname must be previously named by DB-DECLARE or DB-PROCESS-ID. |
|
Cursor positioning keywords. NEXT is the default. |
|
INTO dataname |
Move host variable structure into the alternate data structure data name. Data moves after the actual SQL call via a MOVE statement. Generated code isIF OK-ON-RECMOVE hostname TO dataname |
|
SENSITIVE |
Reflects changes made outside of this cursor. |
|
INSENSITIVE |
Returns rows from the result table as is. |
|
Rowset positioning keywords. NEXT ROWSET is the default. |
|
FOR number ROWS |
Controls how many rows are returned on each FETCH. |
DB-FETCH CURSOR D2MAST-CURSOR ... INTO WS-D2MAST-RECORD