Example of open statement, COBOL Programming

Example of Open statement:

Illustration:

The OPEN INPUT TRANSACTION, OLD-MASTER OUTPUT NEW-MASTER.

The illustration represents that there are two input files named the TRANSACTION and OLD-MASTER and one output file known as the NEW-MASTER.  All these files are opened and these are prepared for reading or writing.

Illustration:

OPEN INPUT MARK-FILE.

OPEN OUTPUT RESULT-FILE.

The first OPEN statement opens the MARK-FILE in the input mode and the file is ready for the reading.  The later statement makes the RESULT-FILE ready for the writing. There may be numerous OPEN statements in a program.

 

Posted Date: 10/16/2012 5:34:19 AM | Location : United States







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

Write discussion on Example of open statement
Your posts are moderated
Related Questions
Transaction file : A transaction file is a file which contains new records those changes to old records which are used to update the master file. The problem of file updatio

PROGRAM FOR DIVIDE VERB:   We have to write an easy program to elaborate DIVIDE verb. You can also use edit characters in the program. Identification division. Program-

B (Blank Insertion) : The occurrence of a B anyplace in the picture will insert a space character in the edited data. There can be more than one B in the picture. Examples:

PERFORM WITH UNTIL OPTION: The format is as shown below: Illustration:  A) Perform p-3 until i > 5. Here p-3 will be executed whenever i B)  Perform p-2 thru

PROGRAM FOR ELECTRICITY BILL: An electricity company supplies electricity to 4 types of customers coded 1, 2, 3 & 4.The rate schedule for customers is shown in one table as

PROGRAM FOR MULTIPLY VERB: We have to write a simple program to elaborate MULTIPLY verb. You can also use the edit characters in the program. Identification division. Pr

Name the divisions in a COBOL program are given below DENTIFICATION DIVISION DATA DIVISION ENVIRONMENT DIVISION PROCEDURE DIVISION.

Picture Clause: The picture clause explains the general characteristics of an elementary data item. These characteristics are elaborated below: Class: In COBOL the

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

VALUE CLAUSE: The value clause defines the preliminary value of the data item. Normally initialization will be completed just before the first statement in the procedure di