How to read a 100 record from a file through cobol?

Answer Posted / y@$w@nth

I. I think ur asking how to read 100th record????
here is the syntax

a. MOVE 100 to rec-key

READ in-file KEY IS rec-key
END-READ.

In the above we followed random reading from a VSAM(KSDS) File

b.For sequential file if u need to read 100Th record then we
need to write a perform statement that will run 100 times
then read statement will execute 100 times then after
termination of perform statement we will have 100th record.

II.If ur asking about u need to read 100 records and store
them in a place go and read the all 100 records and store
each record in a table(array).

Let me know if any other...
Y@$W@nth...
Cheers....

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What rules are to be followed while using the corresponding options?

635


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8157


Have you used comp and comp-3 in your project? And how?

2008


Mention the guidelines to write a structured cobol program?

618


What are the rules of the move verb?

704






What are the different data types in cobol?

787


How do you reference the fixed block file formats from cobol programs

703


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1646


How you can characterize tables in cobol?

712


What is a SSRANGE and NOSSRANGE?

819


what is search and searchall?what is the diffrence between them?give an best example?

5541


What is rmode(24)

676


What are declaratives and what are their uses in cobol?

708


In COBOL programming, what is PERFORM? What is VARYING?

670


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

704