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
calculate simple interest

PROCEDURE DIVISION statements for the indexed files: All the statements which are available for a relative file are also available for an indexed file. READ STTATEMENT :

Label Records / Disk Directory: The most important information stored in the header label is what is termed as the file title. In the situation of magnetic-disk files the labe

REWRITE STATEMENT: As in the situation of a relative file, the REWRITE statement needs that the file should be opened in the I-O mode, and if the SEQENTIAL access mode is spec

INPUT-OUTPUT SECTION: This section holds information regarding the files to be used in the program. There are 2 paragraphs in this section- FILE-CONTROL & I-O-CONTROL. The

DECLARATIVE and FILE STATUS Clause: The input-output exception condition in the situation of a direct access files can be handled by a declarative procedure in a manner simila

PROGRAM FOR SIMPLE PERFORM: We have to write a program to elaborate simple PERFORM statement Identification division. Program- id.  Perf1. Environment division. Da

REWRITE statement: The REWRITE statement is used to update the existing record in a disk file. The normal format is as shown below: REWRIE  record-name  [  FROM      ide

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 TIMES OPTION: The format of a PERFORM TIMES statement is as shown below: Illustration:   A)  Perform the para-2 5 times. In this situation the specifie