IFCCUR (HLI function): Difference between revisions
(Created page with " ==Summary== ===Description=== The IFCCUR call (CLOSE CURSOR) closes the named cursor on the current thread. ===Thread type=== multiple cursor IFSTRT ===IFCALL function numb...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The conventions used on this page are described in [[HLI: Function summary#Function call notation conventions|Function call notation conventions]]. | |||
==Summary== | ==Summary== | ||
<dl> | |||
The IFCCUR call (CLOSE CURSOR) closes the named cursor on the current thread. | <dt>Description</dt> | ||
<dd>The IFCCUR call (CLOSE CURSOR) closes the named cursor on the current thread.</dd> | |||
<dt>Thread type</dt> | |||
multiple cursor IFSTRT | <dd>multiple cursor IFSTRT</dd> | ||
<dt>IFCALL function number</dt> | |||
<dd>125</dd> | |||
125 | </dl> | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">IFCCUR(RETCODE,CURSOR_NAME)</p> | <p class="syntax">IFCCUR(RETCODE,CURSOR_NAME)</p> | ||
<dl> | |||
<dt>Compile-only form</dt> | |||
Not available | <dd>Not available</dd> | ||
<dt>Execute-only form</dt> | |||
<dd>Not available</dd> | |||
Not available | </dl> | ||
<p>Specify the parameters in the syntax order shown above.</p> | <p>Specify the parameters in the syntax order shown above.</p> |
Latest revision as of 22:05, 12 July 2016
The conventions used on this page are described in Function call notation conventions.
Summary
- Description
- The IFCCUR call (CLOSE CURSOR) closes the named cursor on the current thread.
- Thread type
- multiple cursor IFSTRT
- IFCALL function number
- 125
Syntax
IFCCUR(RETCODE,CURSOR_NAME)
- Compile-only form
- Not available
- Execute-only form
- Not available
Specify the parameters in the syntax order shown above.
Parameter | Description |
---|---|
RETCODE | [O,i,r] The Model 204 return code is the required first parameter. The code is a binary integer value. |
CURSOR_NAME | [I,s,r] Is a required input parameter that specifies the name of the cursor to be closed. This is a short character string (maximum 32 characters), the name previously assigned to the cursor in a corresponding IFOCUR call.
See CURSOR_NAME on IFOCUR for a description of the cursor name for the IFOCUR call. |
Usage notes
Use the IFCCUR call to close a cursor that is open on a thread. The IFCCUR call indicates that processing against the cursor is complete.
You can reference a cursor again after it has been closed by reopening it. For example, before referencing a closed cursor in a subsequent IFFTCH statement, reopen it by issuing an IFOCUR call.
Note: When you reopen a cursor, Model 204 locates the cursor one position before the first record or value in the found set.
The IFCCUR call provides companion functionality to the IFOCUR in the host language multiple cursor environment.
Coding example (COBOL)
WORKING-STORAGE SECTION. 01 CALL-ARGS. 05 RETCODE PIC 9(5) COMP SYNC. . . . 05 CURSOR-NAME PIC X(7) VALUE "CRFORD;". . . . PROCEDURE DIVISION. . . . CALL "IFCCUR" USING RETCODE, CURSOR-NAME.
Note: In the example, IFCCUR closes a cursor (named CRFORD) that was opened and named by a previous IFOCUR call (not shown). See the coding example for IFOCUR on IFOCUR. An IFCCUR call can only be used to close a cursor that is open.