Read statements - relative files, COBOL Programming

READ STATEMENTS:

The common format for the read statements is as shown bellow.

Format 1:

READ file-name RECORD [ INTO   identifier ]

[  ;  AT   END     imperative-statements  ] 

Format 2:

READ   file-name RECORD   [  INTO   identifier ]

[ ;  INVALID   KEY   imperative-statement  ]        

Format 3:

READ   file-name   [ NEXT  ]   RECORD  [  INTO   identifier  ]

[   ;   AT   END   imperative-statements   ]

As usual, the READ statement reads a record of a file. The file should be open in either the input or I-O mode. 

 

Posted Date: 10/17/2012 8:12:38 AM | Location : United States







Related Discussions:- Read statements - relative files, Assignment Help, Ask Question on Read statements - relative files, Get Answer, Expert's Help, Read statements - relative files Discussions

Write discussion on Read statements - relative files
Your posts are moderated
Related Questions
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

Illustration of the abbreviation: A few illustration of the abbreviation are given below: Illustration: The compound condition  AMOUNT GREATER THAN 499 AND AMOUNT L

REDEFINES CLAUSE: At times it may be found that two or more storage regions defined in the DATA DIVISION are not in use concurrently. In such situations only one storage regio

File volatility: File volatility associates to the number of times the updating of records are needed during some time period. File interrogation: Some files hold re

Environment Division: The Environment Division is the second division in the COBOL source program. It is mainly machine-dependent . The computer and all the peripheral dev

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.

PROGRAM TO FIND INTEREST ON BANK DEPOSITS: We have to write a program to find interest on deposits. The criteria is given below : identification division. program-

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

LABEL RECORD CLAUSE: This clause specifies whether or not the standard header and trailer labels must be present in the magnetic-tape files. VALUE OF CLAUSE: The VAL

Picture Clause: The picture clause explains the general characteristics of an elementary data item. These characteristics are elaborated below: Class: In COBOL the