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 is amode(24)?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
HOw can I get the negative sign while deduct high value from low value
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
What are the different open modes available in cobol?
Write a program to explain size error.
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
How to print 10 to 1 if the input have only 10 digit number?
Explain about different table spaces.
For rewrite, why is it mandatory that file needs to be opened?
What is the difference between PIC 9.99 and 9v99 in COBOL?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
What are the different rules of SORT operation?