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

Figurative Constants: The Figurative constants have several fixed names and the compiler recognizes these names and it sets up the equivalent values in the object program.

PROGRAM FOR INVENTORY  We have to write a program to update the inventory file. Consider 2 files,viz, invfile an tranfile. Invfile has 3 fields pno,name,qty. Tranfile has 3 fil

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

Currency Sign - edit characters for numeric data: $ (Currency Sign): The single currency sign can appear at the leftmost place of a picture. In that situation the $ cha

RULES FOR INDEXED TABLES: The rules of indexing a table with an INDEXED phrase are as shown below: (1) If indexing is completed for any one level of a table, then indexing

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

GO TO, STOP RUN: The GO TO verb is used to completely transfer the control to elsewhere in the program. Its form is as shown below: GO TO procedure-name As a result o

Numeric -   Literals : The numeric literal can be created with the help of digits only. It can have a sign (+ or -) and can also have a decimal point. If no sign is specifi

OCCURS - INDEXED BY PROGRAM: identification division. program- id. searching. environment division. data division. working-storage section. 01 table1.      0