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
Comparison of Numeric Operands: We are well-known with the kind of the relational condition where both the operands are numeric. The comparison in this situation is algebraic

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

PROGRAM FOR SCREEN SECTION WITH FILES: identification division.   program- id.   environment division.          input-output section.   file-control.     select

Object-Computer - Configuration section: The computer name specifies a specific computer on which the object program is to be executed. The MEMORY SIZE is used to show the

FD Entry for variable-length Records: The RECORDS CONTAINS and BLOCK CONTAINS clause are quite dissimilar in the case of files with variable- length records. The syntax of the

PROGRAM FOR MASTER FILE MAINTENANCE: We have to write a program to keep the stu-file for which a record has just 2 fields,viz., rno(Roll Number) and name(Student Name). Give t

SIGN CONDITION:   The sign condition establishes whether or not the algebraic value of an operand is negative, positive or zero. The operand can be either the numeric identif

Display control verbs in Cobol

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

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