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
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

, (Comma) : A comma, whenever used in a picture, is considered as an insertion character and inserted wherever it become visible. There can be more than one comma in the pictu

NESTED IF STATEMENT:   The then and else statement of an IF statement can hold other IF statements. The involved IF statements in their turn may also hold other IF statements

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

PROGRAM USING OCCURS CLAUSE: We have to write a simple program to demonstrate Occurs Clause. Get the employee details for 3 persons and compute the total salary. identifica

Transaction file : A transaction file is a file which contains new records those changes to old records which are used to update the master file. The problem of file updatio

Rules for constructing an Arithmetic Expression: The rules for constructing an arithmetic expression are as shown below: (i) When an arithmetic expression specifies a calcu

Example of condition names: The illustration below is of the use of the condition names  77  MARITAL-STATUS     PIC    9   88  SINGLE    VALUE    IS     ZERO   88  MA

What is the difference between subscript and index

Abbreviation: The Consecutive relational conditions in a compound condition can be abbreviated in many cases as shown: (i) When the subjects in the consecutive relational c