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
The LENDER Bank offers mortgages on homes valued up to $500,000. The required down payment is calculated as follows: 4% of the first $60,000 borrowed 8% of the next $30,000 borro

SPECIAL-NAMES: This paragraph is used to associate some hardware names to the user-specified mnemonic names. This paragraph is elective in all compilers. The format of this pa

MULTIPLY VERB:   The Multiply Verb causes one or more multiplicands to be multiplied by the multiplier and to store the products. The form of the MULTIPLY verb is as shown be

IF ... ELSE STATEMENT: We are familiar with an easy form of the IF statement. The common form of the IF statement is as shown below: Each of the statement-1 and statem

Example of Level numbers - cobol programming: To explain the hierarchical structure introduced above, the concept of the level number is employed in COBOL. The most broad

ON SIZE ERROR OPTION: Whenever a size error occurs, the contents of the result field after the operation is unpredictable.  Though, the processing is not-terminated and the co

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

BLOCK CONTAINS CLAUSE: Integer -1 of the BLOCK CONTAINS clause indicates the block size either in terms of records or in terms of characters. For illustration, BLOCK CONTAINS

CONDITION - COBOL Programming: The condition is an entity which at one point of time can have only one of the two values - true or false. As we already know that, the IF verb

OPEN statement: We know that the processing of a file should start with the execution of an OPEN statement. The file can be opened in any one of the 4 open modes - INPUT, OUTP