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


Please Help Members By Posting Answers For Below Questions

A table has two indexes defined. Which one will be used by the SEARCH?

1002


) what is the difference between AID and HANDLE AID?

1876


What do you understand by psb and acb?

837


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

2220


Whats the difference between search & search ALL?

5831


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2341


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

1152


How many bytes S(8) comp field occupy and its maximum value?

1841


How to know whether the module is dynamical or statistical?

859


When is inspect verb is used in cobol?

903


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

837


what is search and searchall?what is the diffrence between them?give an best example?

6116


What are the pertinent COBOL

2228


what is amode(24), amode(31), rmode(24) and rmode(any)?

883


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17500