IFCLOSE (HLI function): Difference between revisions
(Created page with " ==Summary== <dl> <dt>Description</dt> <dd>The IFCLOSE call (CLOSE FILE) closes a Model 204 file or group that is open, or closes all the Model 204 files or groups that are op...") |
No edit summary |
||
(One intermediate revision 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== |
Latest revision as of 22:06, 12 July 2016
The conventions used on this page are described in Function call notation conventions.
Summary
- Description
- The IFCLOSE call (CLOSE FILE) closes a Model 204 file or group that is open, or closes all the Model 204 files or groups that are open on the thread.
- Thread type
- multiple cursor IFSTRT, single cursor IFSTRT
- IFCALL function number
- 12
Syntax
IFCLOSE|IFCLOS(RETCODE,FILE_SPEC)
- 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. |
FILE_SPEC |
[I,s,o] The file specification is an optional input parameter for use only with a multiple cursor IFSTRT thread for specifying the name of a particular Model 204 file or group to be closed. Specify the name as a short character string. If a file or group that is not open is specified, the call is unsuccessful and Model 204 returns a completion code equal to 4. If the file specification parameter is omitted, IFCLOSE closes all files and groups that are open on the thread. |
Usage notes
Use the IFCLOSE call to close files or groups that are open on a thread. IFCLOSE indicates that processing against the file or group for the current request is complete.
The IFCLOSE call is valid on all types of IFSTRT threads. On a single cursor IFSTRT thread, IFCLOSE closes all files or groups that are open. The action is the same on a multiple cursor IFSTRT thread, unless you specify a particular file or group to be closed.
Notes: In group file context, IFCLOSE ends the transaction only if it results in the closing of a file and all files opened outside of the group have been closed. IFCLOSE does not end the transaction if all files in the group are opened singly.
IFCLOSE causes all saved compilations to be discarded.
Coding example (COBOL)
WORKING-STORAGE SECTION. 01 CALL-ARGS. 05 RETCODE PIC 9(5) COMP SYNC. 05 FILESPEC PIC X(5) VALUE "CARS;". . . . PROCEDURE DIVISION. . . . CALL "IFCLOSE" USING RETCODE, FILESPEC.
Note: This example illustrates the use of the file specification parameter (FILESPEC), which is available for use only with a multiple cursor IFSTRT thread.