in a indexed file what is procedure for read the records
from 12 to 18. please give the code example

Answer Posted / santhosh vayathuri

use fallowing code

file-control
organization is indexed.
access mode is dynamic
record key is eno


procedure division

move 12 to eno


perform readpara until fnd = yes

stop run.

readpara.
read file1
if eno = 18
move 'yes' to fnd
end-if.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats the difference between search & search ALL?

5990


A table has two indexes defined. Which one will be used by the SEARCH?

1064


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

906


Write down the divisions of cobol program?

889


What is the difference between PIC 9.99 and 9v99 in COBOL?

1031


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

2060


What is report-item in COBOL?

933


how do you reference the esds vsam file formats from cobol programs

925


Why did you choose to work with ibm mainframe cobol programming?

890


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

1794


how do you define single dimensional array and multidimensional array in your cobol?

903


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2363


i need a small 3d program using inline and outline.

1960


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

896


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

1218