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

Answers were Sorted based on User's Feedback



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

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

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

Answer / satish

it is dynamical acess.using start verb it is done

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

How do we get current date from system with century?

2 Answers  


I have the file which is having the extension no as records. sample file will look like below. 2310 3410 3256 4350 3781 5408 I need to replace the record which is starting with 3 to 5 (i.e) 3410 to 5410. How can we do it through cobol and cobol-db2 program? I need the possible logic?

5 Answers   RBS,


01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. what would be the value of yyy

13 Answers   HSBC,


How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.

2 Answers  


What is the file organization clause ?

2 Answers  






in real time what is the suitable exp where in-stream procedure is better then catalog procedure.

1 Answers  


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

0 Answers  


how do you reference the fixed unblock file formats from cobol programs

0 Answers  


How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)

3 Answers   IBM,


What is the mode in which you will OPEN a file for writing?

4 Answers  


What is static and dynamic call in cobol?

0 Answers  


db2 variable decimal(15,2) what is the equalent size of cobol variable

2 Answers   Syntel,


Categories