How to read the last 100 records from a COBOL file. The file
contains N number of records.
Answer Posted / santy
let consider,
First declear 2 count variables A,B.
first count all the records i.e. N and put it into A
varialbe.
compute statement B=A-100, i.e. B=N-100
now again use the read-para untill condition B=A
and in read para incrased the value of B=B+1 after each
read.
Is This Answer Correct ? | 19 Yes | 3 No |
Post New Answer View All Answers
Discuss about changing dataset name in proc.
Which is not true about evaluate statement
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
Write the code to count the sum of n natural numbers.
What is the difference between perform … with test after and perform … with test before?
State the various causes of s0c1, s0c5 and s0c7.
Whats the difference between search & search ALL?
What is the Purpose of Pointer in the string?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
i want a program using by if, evaluate , string, unstring, perform, occurs?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is amode(31)
HOw can I get the negative sign while deduct high value from low value
Explain about different table spaces.