Procedure division statements for the indexed files, COBOL Programming

PROCEDURE DIVISION statements for the indexed files:

All the statements which are available for a relative file are also available for an indexed file.

READ STTATEMENT :

When either the RANDOM or DYNAMIC access mode is specified or the records are to be read in a random manner, the syntax is as shown below:

READ  file-name RECORD  [  INTO  IDENTIFIER  ]

           [  ; KEY   IS data-name ]

           [  ; INVALID  KEY  imperative-statement  ]

The data name in the KEY IS phrase should be either the prime key or the alternative key item. If the phrase is not specified, then the prime key is supposed. Let consider PERSONNEL be an indexed file and let EMP-NO be the prime key and NAME be the alternative key. 

 

Posted Date: 10/17/2012 8:40:52 AM | Location : United States







Related Discussions:- Procedure division statements for the indexed files, Assignment Help, Ask Question on Procedure division statements for the indexed files, Get Answer, Expert's Help, Procedure division statements for the indexed files Discussions

Write discussion on Procedure division statements for the indexed files
Your posts are moderated
Related Questions
ON SIZE ERROR OPTION:   If after an arithmetic expression, the result exceeds the highest value which can be accommodated in the result; this error is termed as size error. T

PROCEDURE DIVISION statements for the indexed files: All the statements which are available for a relative file are also available for an indexed file. READ STTATEMENT :

Write a COBOL IF sentence to use the values of numeric variables EXAM and COURSEWORK , both assumed to be with format PIC 999 and in the range 0 to 100 and to move the value:

ADD VERB: The ADD Verb can be used to find the sum of two or more numbers and to store the sum.  The ADD verb takes any one of the two forms as shown below:

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

What is the difference b/w index and subscript? Subscript indicates to the array occurrence whereas index is the displacement (in no of bytes) from the beginning of the array.

what does it used


BLANK WHEN ZERO: BLANK WHEN ZERO is an editing clause that may be used along with a picture. This will set the whole data item to blanks of its value is equal to zero. Though,

WRITE STATEMENT: The WRITE Statement verb releases a record in an output file. The syntax for the WRITE statement can be unlike depending on the output device and the medium us