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
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
What are the cobol coding sheets?
Why occurs cannot be used in 01 level in COBOL?
Whats the difference between search & search ALL?
What is a scope terminator give example?
What kind of error is trapped by on size error option?
What is cobol?
What is the difference between PIC 9.99 and 9v99 in COBOL?
i want a program using by if, evaluate , string, unstring, perform, occurs?
How are the next sentence and continue different from each other?
What is inspect in cobol ?
Name some of the examples of COBOl 11?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What is the difference between PIC 9.99 and PIC9v99?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.