IFCCUR (HLI function)

From m204wiki
Jump to navigation Jump to search

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.