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
Differentiate between structured cobol programming and object-oriented cobol programming.
How do you differentiate between cobol and cobol-ii?
What is the use of intialize verb?
How do get the result of your program directly on your pc?
What is rmode(24)
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
How do we get current date from system with century in COBOL?
What is a report item?
What do you understand by psb and acb?
How do you get the data to code the BMS macro?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
What are 77 levels used for?
what is amode(24), amode(31), rmode(24) and rmode(any)?
In COBOL programming, what is PERFORM? What is VARYING?
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?