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
Illustration of simple sort verb: Illustration: Suppose that we have a card file with the following records description in the data division. The names of the work fil

CLOSE statement: The simplified syntax of the CLOSE statement is as shown below:   CLOSE          file-name-1   [WITH   LOCK   ]                         [  , file-

Rules for Simple sort verb: The work file is to be defined by a sort elaboration entry (SD entry).The format of SD entry is as shown below. The rules below should be taken

PROCEDURE DIVISION statements for the relative files: The statements OPEN, CLOSE, READ, WRITE and REWRITE that are available for sequential files are also available for the re

Illustration of nested if statement: Consider the nested sentence which is as shown below: The IF-ELSE pairs in this sentence can be detected by applying the rule whic

Buffers: The Modern computers are able of handling I-O operations independent of the CPU by means of the hardware termed as data channel. For illustration, if two buffers a

INDEXED SEQUENTIAL FILES: In the indexed sequential files which are also known as indexed files, the records are stored in the sequence order generally in ascending order. In

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

BLOCK CONTAINS CLAUSE: Integer -1 of the BLOCK CONTAINS clause indicates the block size either in terms of records or in terms of characters. For illustration, BLOCK CONTAINS

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