I had 100 records and i want to execute last three records by
using cobol programming?what will be coding?
Answers were Sorted based on User's Feedback
Answer / atul
Using Short card you can write the last 3 records.
Short card as :
SORT FIELDS=COPY SKIPREC=97 STOPAFT=03
It will copy the last three records and put it in a file.
Cobol program can use this file containing records.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sandip
In cobol apply counter while reading file if counter reach at 97 start writing record to another file.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / harsha
Read file sequentially and load it in table. keep check on
the number of ocurances(i.e. number of records).
Once the table is fully loaded, you know the total
occurances. Say it is X. Now read the table with occurance
X-3
Is This Answer Correct ? | 2 Yes | 2 No |
What is the maximum length of a field you can define using COMP-3?
4 Answers Complex System, Infosys,
When the working storage variables get allocated? a.At Compile time b.At starting of the run time c.At end of the run time. d.None of these
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
in cobol main pgm is calling sub pgm but sub pgm does not exists , what abend i get if submit the job?
what is rediffine clause?in what situation it can use?give me real time example?
what are difference organizations in cobol and access mode in cobol? can you expalin what organization means while declaring for ksds,esds,rrds?
What is the difference between Structured COBOL Programming and Object Oriented COBOL ?
Difference between cobol and cobol-ii?
What is Alternate Index ? How is it different from regular index ?
What is the difference between COMP & COMP-3 ?
how to crack cts interview apps? NOVEMBER 21 2010
1.What is the default print format in cobol?