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 |
input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.
I have a files containing both duplicate and non-duplicate records.The file is already sorted by a key.I want to determine those records that are duplicate and records that are non-duplicate.If duplicate the record is move to a duplicate file and if non-duplicate that will be move to valid file.thank you
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
01 var1 pic s9(9)v99. 01 var2 pic x(30). procedure division. move 12345.99 to var1. move12345.99 to var2. display var1. display var2. what is the output?
Please let me know at which Scenarios we will go for STATIC call or DYNAMIC
a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?
When is a scope terminator mandatory?
How can you submit a job from COBOL programs?
What are the different rules of SORT operation?
How to read records which is in sequential file in reverse order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my doubt any one
Why we should use cursor ?
In an EVALUATE statement, can I give a complex condition on a when clause?