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
What rules are to be followed while using the corresponding options?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
Have you used comp and comp-3 in your project? And how?
Mention the guidelines to write a structured cobol program?
What are the rules of the move verb?
What are the different data types in cobol?
How do you reference the fixed block file formats from cobol programs
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
How you can characterize tables in cobol?
What is a SSRANGE and NOSSRANGE?
what is search and searchall?what is the diffrence between them?give an best example?
What is rmode(24)
What are declaratives and what are their uses in cobol?
In COBOL programming, what is PERFORM? What is VARYING?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?