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
Record Description for the Variable-length Records: When the variable- length records consists of records of various lengths, each record type is to be explained at level 01 f

CLOSE STATEMENT: When the processing of a file is completed, then the file may be closed. This is completed with the help of the CLOSE-verb. The form of the CLOSE statement is

FILE-CONTROL paragraph for the relative files: The normal format for the SELECT clause for a relative file is as shown below. SELECT  file-name  ASSIGN  TO  implementor-nam

REWRITE STATEMENT: As in the situation of a relative file, the REWRITE statement needs that the file should be opened in the I-O mode, and if the SEQENTIAL access mode is spec

PROGRAM FOR PERFORM ...UNTIL We have to write a program to find the sum of "n" natural numbers. Identification division. Program- id. PerfUntil. Environment division.

Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing.   Z    *  $  -    +    CR    DB    .    ,    B    O    /

Abbreviation: The Consecutive relational conditions in a compound condition can be abbreviated in many cases as shown: (i) When the subjects in the consecutive relational c

How do i write a simple cobol programming that works

Example of Open statement: Illustration: The OPEN INPUT TRANSACTION, OLD-MASTER OUTPUT NEW-MASTER. The illustration represents that there are two input files named the

Example of Special-names: Consider the illustration: Let the SPECIAL-NAMES paragraph be as shown: SPECIAL-NAMES. CHANNEL 1 IS PAGE-TOP. The Channel is related with the t