Close statement, COBOL Programming


When the processing of a file is completed, then the file may be closed. This is completed with the help of the CLOSE-verb. The form of the CLOSE statement is as shown below:

            CLOSE     file-name-1       [,   file-name-2]               ...

The file should be open when a close statement can be executed. And once a file is closed, it is no longer accessible to the program. It must be opened again if the file is needed consequently.  It may be noted that dissimilar the OPEN statement, the nature of the use of the input & output file must not be mentioned in the CLOSE statement.



This statement will close all the 4 files - TRANSACTION, OLD-MASTER, PRINT-FILE  and the NEW MASTER.


Posted Date: 10/16/2012 5:39:42 AM | Location : United States

Related Discussions:- Close statement, Assignment Help, Ask Question on Close statement, Get Answer, Expert's Help, Close statement Discussions

Write discussion on Close statement
Your posts are moderated
Related Questions
RULES FOR OCCURS CLAUSE: The rules apply for the OCCURS clause and the subscripts are as shown below. (1) The integer in the OCCURS clause should be a positive integer.

How do I move a single QUOTE to a field or set the value clause? "''" does not work?

PROGRAM FOR PERFORM ...UNTIL We have to write a program to find the sum of "n" natural numbers. Identification division. Program- id. PerfUntil. Environment division.

File volatility: File volatility associates to the number of times the updating of records are needed during some time period. File interrogation: Some files hold re

Rules for constructing an Arithmetic Expression: The rules for constructing an arithmetic expression are as shown below: (i) When an arithmetic expression specifies a calcu

WRITE STATEMENT: The records are written to be logical place as determined from the value of the record key. The INVALID KEY condition occurs in the cases shown below: (i)

SIMPLE MERGE VERB: Like sorting, the merging of files is often required in different commercial application. It is likely to merge two or more files with the help of one MERGE

FILE-CONTROL: The FILE-CONTROL paragraph names each and every file and identifies the first medium through file control entries. The basic format of a file control entry is gi

PICTURE specification: The size of a group item is equivalent to the total of the sizes of all the subordinate elementary items. The group item class is alphanumeric. The i

IF STATEMENT: The easiest form of the IF statement is  IF condition-1 statement-1 where the condition-1 may be any one from the shown below. When the condition-1