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
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
Write a cobol program making use of the redefine clause.
In COBOL programming, what is PERFORM? What is VARYING?
Can we change the password using ALTER? anyone tried and changed?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
Explain what you understand by passing by value.
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
What is amode(24)?
Which is not true about evaluate statement
How to print 10 to 1 if the input have only 10 digit number?
What is the difference between Call and a Link?
What rules are followed by the search verb.
what are decleratives in cobol?
Mention the guidelines to write a structured cobol program?
When is inspect verb is used in cobol?