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
File Description for the Relative and Indexed Files: The FD entry for a relative or an indexed file is similar to that of a sequential file. Some compilers do not permit varia

REWRITE STATEMENT: The REWRITE statement has the format for a relative file as shown below, REWRITE record-name  [ FORM identifier ]

Example of Accept statement: For illustration, ACCEPT FLAG-A can be specified to read the value of the FLAG_A from the console. It may be keep in mind that no file definition

Comparison of Numeric Operands: We are well-known with the kind of the relational condition where both the operands are numeric. The comparison in this situation is algebraic

UPDATING OF THE RELATIVE AND INDEXED FILES: The Sequential files are updated by creating a new master file from an existing old master file and a transaction file. Such an Upda

COMPOUND CONDITION: The two simple conditions can be connected by the logical operators AND or OR to form a compound condition (also termed as combined condition). When two co

NESTED IF STATEMENT:   The then and else statement of an IF statement can hold other IF statements. The involved IF statements in their turn may also hold other IF statements

RULES OF RENAMES CLAUSE:   The rules below should be observed while using the RENAMES clause: (i) All RENAMES entries should be written only after the last record descript

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

Name the divisions in a COBOL program are given below DENTIFICATION DIVISION DATA DIVISION ENVIRONMENT DIVISION PROCEDURE DIVISION.