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
What is inspect in cobol ?
What are different data types in cobol?
How do you reference the fixed block file formats from cobol programs
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
How to remove 2 duplicate records and copy only one using job control language?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What are the cobol coding sheets?
What are literals?
Why occurs cannot be used in 01 level in COBOL?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
how to move the records from file to array table. give with code example
How do you define a variable of comp-1 and comp-2?
Write a program that uses move corresponding.
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly