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 are the various section in data division and briefly explain them.
What is difference between static and dynamic call in cobol?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
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?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
What is perform what is varying?
What is rmode(any) ?
how to move the records from file to array table. give with code example
What type of SDLC u followed? Why?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
how do you reference the fixed unblock file formats from cobol programs
When is inspect verb is used in cobol?