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
OCCURS - INDEXED BY PROGRAM: identification division. program- id. searching. environment division. data division. working-storage section. 01 table1.      0

Example of Move corresponding: Consider the DATA DIVISION entries shown below. Suppose it is needed that the data stored in the 4 fields of the PAY_REC should be

Character Set: To study any language, first one should know the alphabets of the language and they are termed as character set in general. There are 50 different characters in

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

REWRITE statement: The REWRITE statement is used to update the existing record in a disk file. The normal format is as shown below: REWRIE  record-name  [  FROM      ide

Block Size: The normal practice is to group a number of consecutive records to form that is termed as a block or a physical record. The number of records in a block is frequen

FILE-CONTROL ENTRIES FOR THE SEQUENTIAL FILES: The characteristics of each and every files handled in a program are specified in the ENVIRONMENT DIVISION and DATA DIVISION.

DISPLAY STATEMENT:   The function of the DISPLAY statement is just opposite to that of the ACCEPT statement. It is used to display the low-volume results on the operator's co

PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION (RANDOM MODE): We have to write a program to create an Indexed Sequential File in random mode for Student particulars. Suppose jus

Floating Insertion   The currency symbol ($) can emerge in multiples on the left-hand side of the picture. In this situation the character will be treated in similar way as t