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

what is difference between cobol and cobol/400

21572


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

700


) How do u handle errors in BMS macro?

1431


What is the difference between binary search and sequential search?

643


What is Pic 9v99 Indicates in COBOL?

731






What are the pertinent COBOL

2047


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

722


What do you understand by psb and acb?

668


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

744


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2339


What is the difference between PIC 9.99 and PIC9v99?

783


How many sections are there in data division in COBOL?

680


What is a SSRANGE and NOSSRANGE?

826


How many bytes S(8) comp field occupy and its maximum value?

1638


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

691