how to fetch the record before the last record in a cobol
file( its a huge file and if the key field is not known)
Answer Posted / mailid
1.Read the file sequentially
2.For every successful read, move the key field to temp variable
3.when EOF is reached, A separate section should be performed in which Key field should not be moved to temp variable, Now, the temp variable will have key of the previously read record.
Using this, we can do a keyed read on the file to fetch the last but one record.
Is This Answer Correct ? | 5 Yes | 6 No |
Post New Answer View All Answers
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 guidelines should be followed to write a structured cobol prgm?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
How to know whether the module is dynamical or statistical?
For rewrite, why is it mandatory that file needs to be opened?
how do you reference the variable unblock file formats from cobol programs
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
How do get the result of your program directly on your pc?
What do you understand by psb and acb?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
what are decleratives in cobol?
In COBOL programming, what is PERFORM? What is VARYING?
How you can characterize tables in cobol?
how can i see junk values in dclgen or in hostvariable of comp ?
Are you comfortable in cobol or jcl?