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
TO WRITE A QUADRATIC EQN ROOTS ARE COMPLEX IN COBOL PROGRAM

DATA RECORD CLAUSE: The DATA RECORD clause, documents the record names defined for the file. For illustration, DATA RECORDS ARE REC-1, REC-2, REC-3 that means there are 3diffe

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

Rules for apply for the condition name: The rules below apply for the condition name. (i) The Condition names should be explained at level 88. The level number starts in ma

MULTI-DIMENSIONAL TABLES: The type of table which has been considered above is known as one-dimensional table. Whenever a table is such that each of its elements in turn is a

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

I uploaded a file from PC to Mainframe, variable LRCL 256. In my COBOL program I defined it as FD INPUT-FILE LABEL RECORDS ARE OMITTED BLOCK CONTAINS 0 RECORDING MODE

WRITE Statement:      The WRITE statement for a relative file has the format which is as shown below.          WRITE  record-name   [ FORM   identifier ]

DECLARATIVE and FILE STATUS Clause: The input-output exception condition in the situation of a direct access files can be handled by a declarative procedure in a manner simila

, (Comma) : A comma, whenever used in a picture, is considered as an insertion character and inserted wherever it become visible. There can be more than one comma in the pictu