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
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

Example of Sign condition: The illustration below describes the use of the sign condition. Illustration:     77  BALANCE  PIC  S9 (6) V99.       .       .     I

OCCURS - INDEXED BY PROGRAM: identification division. program- id. searching. environment division. data division. working-storage section. 01 table1.      0

Data Division: The Data Division is a part of the COBOL program where every data item processed by the program is described. It is very important to note that unless a data

PROGRAM FOR SCREEN SECTION WITH FILES: identification division.   program- id.   environment division.          input-output section.   file-control.     select

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

Minus sign - edit characters for numeric data: The minus sign can appear either at the leftmost or rightmost location of the picture. If an item is negative, a minus sign will

RENAMES CLAUSE: At times re-grouping of an elementary data items in a record may be essential so that they can belong to the original as well as to the latest group. This is o

PROGRAM FOR SUBTRACT VERB: We have to write a simple program to elaborate the SUBTRACT verb. You can also use edit characters in the program. Identification division. Pr

SIMPLE MERGE VERB: Like sorting, the merging of files is often required in different commercial application. It is likely to merge two or more files with the help of one MERGE