Rules of read statements, COBOL Programming

Rules of read statements:

The next record is identified according to the rules as shown below:

(i) Whenever the READ NEXT statement is the initial statement to be executed after the open statement on the file, the next record is the initial record of the file.

(ii) Whenever the execution of the READ NEXT statement follows the execution of the other READ statement on similar file (format 2 or format 3), the next record is the record following the one previously read.             

(iii) Whenever the execution of the READ NEXT statement follows the execution of the start statement.

 

 

Posted Date: 10/17/2012 8:14:21 AM | Location : United States







Related Discussions:- Rules of read statements, Assignment Help, Ask Question on Rules of read statements, Get Answer, Expert's Help, Rules of read statements Discussions

Write discussion on Rules of read statements
Your posts are moderated
Related Questions
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

Example of Sign condition: The illustration below describes the use of the sign condition. Illustration:     77  BALANCE  PIC  S9 (6) V99.       .       .     I

PROGRAM TO DEMONSTRATE MERGE VERB: The two files for which a record having 2 fields viz. Account Number and Name are already available. Now Merge these two files and create a

READ STATEMENTS: The common format for the read statements is as shown bellow. Format 1: READ file-name RECORD [ INTO   identifier ] [  ;  AT   END     imperative-s

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 File-control: The assign clause assigns a specific physical peripheral device name to a file. The physical peripheral device are machine-dependent. We use the devic

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 INDEXED SEQUENTIAL FILE CREATION: We have to write a program to create an Indexed Sequential File in a dynamic mode for Student particulars. Suppose just 3 fields:

Comparison of the Numeric Operand with Nonnumeric Operand: The numeric operand can be compared to the nonnumeric operand subject to the restrictions which are as follows.

INDEXED TABLES: The OCCURS clause that is used to define tables can optionally have an INDEXED phrase. This phrase involves the names of data items which are to be used as sub