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
Comparison of Nonnumeric Operands: A nonnumeric operand can be compared to the other nonnumeric operand according to the rules as shown below: (i) Fields of Equal Sizes:

Illustration of simple sort verb: Illustration: Suppose that we have a card file with the following records description in the data division. The names of the work fil

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

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.

RULES OF RENAMES CLAUSE:   The rules below should be observed while using the RENAMES clause: (i) All RENAMES entries should be written only after the last record descript

Illustration of Renames clause: In the illustration, PAT-OTHER-THAN-BASIC will become a fresh group consisting of DEARNESS-ALLOWANCE, HOUSE-RENT & MTHLY-INCENTIVE. Keep in min

SEQUENTIAL FILES WITH THE VARIABLE-LENGTH RECORDS: The Magnetic - tape or disk files can hold variable-length records. In this situation the file can have records with various

Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi

COMPOUND CONDITION: The two simple conditions can be connected by the logical operators AND or OR to form a compound condition (also termed as combined condition). When two co