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
How do we get current date from system with century in COBOL?
Describe the cobol database components?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
HOw can I get the negative sign while deduct high value from low value
Which division and paragraphs are mandatory for a COBOL program?
How do get the result of your program directly on your pc?
What is the difference between Call and a Link?
A table has two indexes defined. Which one will be used by the SEARCH?
What is perform what is varying?
Write down the divisions of cobol program?
Mention the guidelines to write a structured cobol program?
how do you reference the esds vsam file formats from cobol programs
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.
Write the code to count the sum of n natural numbers.
Write a program to enter and display the names of students in a class using the occurs clause.