Close statement, COBOL Programming

Assignment Help:

CLOSE STATEMENT:

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.

Illustration:

CLOSE OLD-MASTER, TRANSACTION, NEW-MASTER, PRINT-FILE.

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

 


Related Discussions:- Close statement

Move verb - cobol programming, Introduction to MOVE Verb: The aim of th...

Introduction to MOVE Verb: The aim of this section is to introduce the learner how to move data from one place to the other place in the memory. This is completed with the help

Perform with varying option, PERFORM WITH VARYING OPTION: The format i...

PERFORM WITH VARYING OPTION: The format is as shown below:

Format for cobol programs, Format for COBOL Programs: The COBOL is a h...

Format for COBOL Programs: The COBOL is a high-level language. Therefore, a COBOL program can be executed on a computer for which a COBOL compiler exists. The compiler transla

Illustration of multiply verb, Illustration of Multiply verb: (a)  MUL...

Illustration of Multiply verb: (a)  MULTIPLY A BY B. In this situation the value of A & B will be multiplied and the product will be stored in B.  The decimal point locatio

Rules for constructing an arithmetic expression, Rules for constructing an ...

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

Example of class condition, Example of Class condition: Let the BASIC-...

Example of Class condition: Let the BASIC-PAY be a data name in the card record defined with picture 9(5) V99. By reading the card we can test the value of the BASIC-PAY to ma

Occurs clause, Occurs Clause: Let us establish tables with the help of...

Occurs Clause: Let us establish tables with the help of an illustration. Assume that there are ten different types of income-tax rates that are read from some input medium and

Figurative constants - cobol program, Figurative Constants: The Figura...

Figurative Constants: The Figurative constants have several fixed names and the compiler recognizes these names and it sets up the equivalent values in the object program.

Illustration of subtract verb, Illustration of Subtract verb: (a) SUBT...

Illustration of Subtract verb: (a) SUBTRACT A FROM B. This illustration means that the value of A will be subtracted from the value of B and the subtracted result will be s

Character set - cobol programming, Character Set: To study any languag...

Character Set: To study any language, first one should know the alphabets of the language and they are termed as character set in general. There are 50 different characters in

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd