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..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
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
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
Mention the guidelines to write a structured cobol program?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
How do u write test cases?
How to know whether the module is dynamical or statistical?
How are the next sentence and continue different from each other?
How you can read the file from bottom?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
A table has two indexes defined. Which one will be used by the SEARCH?
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)?
What is the Purpose of Pointer in the string?