How to read a 100 record from a file through cobol?
Answers were Sorted based on User's Feedback
Answer / rajesh k
using arrays we can read 100 records from a file.
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / 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 |
1)what is the maximum limit for occurs? Eg: 01 A PIC X(10) OCCURS N TIME. What is the max value for N?
Whats the difference between search & search ALL?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
why do u need inspect verb?
how to check whether the open command of a sequential file is successful? or not?
Hi All, how is sign is stored in S9(17) comp-3 variable. Answer with an Example will be of great help.
how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?
Read filea And file b write the same records in both files? Records in a but not in b record in b but not in a
how to access vsam files in cobol and how to differentiate that this is ESDS file
How is sign stored in Packed Decimal fields and Zoned Decimal fields?
How many bytes S(8) comp field occupy and its maximum value?
Describe the difference between subscripting and indexing ?