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
Sign - Picture clause: The numeric data item can be signed or unsigned. If a numeric data is regarded as unsigned then during the execution these unsigned data items are treat

Object-Computer - Configuration section: The computer name specifies a specific computer on which the object program is to be executed. The MEMORY SIZE is used to show the

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 :

Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi

PROGRAM FOR INVENTORY  We have to write a program to update the inventory file. Consider 2 files,viz, invfile an tranfile. Invfile has 3 fields pno,name,qty. Tranfile has 3 fil

ROUNDED OPTION: Let us consider the DATA DIVISION entries which are as shown below: Now, subsequent to the execution of the statement ADD A B GIVING C, the C will hold

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

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

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-

RULES OF REDEFINES CLAUSE The rules shown below govern the use of the REDEFINES clause: (i) The level-number of data-name-1 and data-name-2 should be identical. (ii) Exce