Read statement, COBOL Programming

READ STATEMENT:

The aim of this verb is to make available the next logical record from the input file. It is important to note the meaning of the "next" logical record in the above statement. The foremost time the READ statement is executed, and then the first record of the file will be read into the record region explained in the FILE SECTION of the DATA DIVISION. The later time the READ statement is executed, the second record will be read in the similar region. In this way each time a READ statement is executed the successive records will be read in the similar region.  Hence a time will come when there will be no more records in the file. In that situation the statements following the AT END clause will be executed. The format of the READ statement is shown below:

                     READ file-name RECORD [INTO identifier-1]

                                AT END imperative-statement 

 

 

Posted Date: 10/16/2012 5:35:15 AM | Location : United States







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

Write discussion on Read statement
Your posts are moderated
Related Questions
Group Item as Operand in the Relational Condition: Whenever an operand of a relational condition is the group item, the item is then considered to be an alphanumeric field. Th

ADD and SUBTRACT CORRESPONDING: The CORRESPONDING option can also used with the ADD and SUBTRACT verbs. The following are some of the formats of these verbs with the CORRESPON

Comparing features of oracle rdbms with Mysql

Program for Sequential File Creation & Rewriting  We have to write a program to create a Length file with just two fields: l (Length) and l-c (Length-Code). Add a few records.

OCCURS CLAUSE - PROGRAM: We have to write a program to elaborate occurs clause. Get names and marks of the students and show them on the screen.   identification division.

Direct Organization: Besides the relative or indexed organization, also a direct access file can be designed to have what is termed as direct organization.  In this organizati

MULTI-DIMENSIONAL TABLES: The type of table which has been considered above is known as one-dimensional table. Whenever a table is such that each of its elements in turn is a

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

PROGRAM FOR MOVE CORRESPONDING: We have to write a simple program to demonstrate Move Corresponding. identification division.   program- id.   environment division.

WRITE STATEMENT: The WRITE Statement verb releases a record in an output file. The syntax for the WRITE statement can be unlike depending on the output device and the medium us