Common form of the read statements, COBOL Programming

Common form of the READ statements:

Format 1 is the common form of the READ statements.

Format 2 is used when the access mode is either random or dynamic. For illustration, assume REL-KEY is the names for the relative file and the relative key data item respectively. The statements below will read the 50th record from the file.

MOVE    50    TO    REL-KEY.

READ    REL-FILE RECORD INVALID-KEY   GO TO PARA-INVALID.

Format 3 of the read statement can be used whenever the access mode is dynamic and the records are to be read successively. 

 

Posted Date: 10/17/2012 8:13:27 AM | Location : United States







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

Write discussion on Common form of the read statements
Your posts are moderated
Related Questions
PROCEDURE DIVISION statements for the indexed files: All the statements which are available for a relative file are also available for an indexed file. READ STTATEMENT :

Write a COBOL IF sentence to use the values of numeric variables EXAM and COURSEWORK , both assumed to be with format PIC 999 and in the range 0 to 100 and to move the value:

How do i write a simple cobol programming that works

ADD and SUBTRACT CORRESPONDING: The CORRESPONDING option can also used with the ADD and SUBTRACT verbs. The following are some of the formats of these verbs with the CORRESPON

PROGRAM FOR DIVIDE VERB:   We have to write an easy program to elaborate DIVIDE verb. You can also use edit characters in the program. Identification division. Program-

PROGRAM FOR MOVE CORRESPONDING: We have to write a simple program to demonstrate Move Corresponding. identification division.   program- id.   environment division.

SEQUENTIAL FILES:   The purpose of the proposed section is to introduce the concepts such as File characteristics, File Description for Fixed-Length Records, File-Control

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

Size: The number of characters or digits needed to store the data item in the memory in termed as the Size of the data item. All the 4 general characteristics explained can

SEQUENTIAL FILES WITH THE VARIABLE-LENGTH RECORDS: The Magnetic - tape or disk files can hold variable-length records. In this situation the file can have records with various