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 the difference between structured cobol programming and object alternativelyiented cobol programming?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
Whats the difference between search & search ALL?
Explain what you understand by passing by value.
What is the difference between external and global variables in COBOL?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
How do you differentiate between cobol and cobol-ii?
Which mode is used to operate the sequential file?
What are the different rules to perform a Search?
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.
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
Which division and paragraphs are mandatory for a COBOL program?
Write a program to enter and display the names of students in a class using the occurs clause.
How to know whether the module is dynamical or statistical?