How to read the last 100 records from a COBOL file. The file
contains N number of records.

Answer Posted / kk

Hi,
u declare two count variable.first count all the
records.then using compute statement count - 100.now move
the count no to second one.now again use read at end.now
give the condition grater than count-2 display rec.

Is This Answer Correct ?    4 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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)?

622


how do you reference the rrds file formats from cobol programs

792


What is the LINKAGE SECTION used in COBOL?

885


how do you reference the printer file formats from cobol programs

651


how do you reference the fixed unblock file formats from cobol programs

702






What is the difference between goback, stop run and exit program in cobol?

916


I have a File that has duplicate records. I need only those records that occur more than thrice.?

8632


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5051


) what is the difference between AID and HANDLE AID?

1628


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1695


Can we redefine the field of x(200) to less than 200?

814


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

670


What is rmode(24)

676


What is the difference between PIC 9.99 and PIC9v99?

771


What are the different rules for performing sort operation?

755