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

Answer Posted / m.rajasekaran

Hi Mobi and Remya,

logic is correct

But in PARA2 u have coded that COMPUTE C = C + 1, How it
will work?

You should have moved B to C after calculating the value
of B in PARA1.Then only this code will work.

Let me know if any mistake in my answer.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various section in data division and briefly explain them.

692


What rules are to be followed while using the corresponding options?

631


What is static and dynamic call in cobol?

590


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

676


How arrays can be defined in COBOL?

661






Name the divisions, which are available in a cobol program?

681


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

624


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5370


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

743


what is the difference between COBOL2 AND COBOL390?

2447


How do you define a variable of comp-1 and comp-2?

700


example for sub strings ? and refernce modifications whit output pls

1843


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

2102


what happens if parmparameter passes zero bytes to the program

1659


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1019