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
SEARCH VERB: The SEARCH verb is used to position elements in one-dimensional tables. Let us consider the following problem. Assume that each element of a table consists of thr

Point Location: The position of the decimal point is the other characteristic which can be specified in the case of the numeric data items. If the position is not specified, t

we have input file ,record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input file

INPUT AND OUTPUT PROCEDURE IN SORT STATEMENT: The common format of the SORT statement can write as shown below: The format of the RELEASE statement is as shown be

PROGRAM FOR IF -ELSE: We have to write a program to check whether the given number is ODD or EVEN. You can use IF..ELSE. Identification division. Program- id. IfElse.

PROGRAM FOR IF :   We have to write a program to check whether the given number is ODD or EVEN. Identification division. Program- id. Ifst. Environment division.

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

Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing.   Z    *  $  -    +    CR    DB    .    ,    B    O    /

Configuration Section: This section holds an overall specification of the computer used for the purpose of the compilation and execution of the program. There are in all 3 par

Example of Nested if statement: Illustration: Consider the following sentence The nested IF sentence holds two IFs and one ELSE. The IF-ELSE couple has been marke