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
How are the next sentence and continue different from each other?
How to remove 2 duplicate records and copy only one using job control language?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
how to convert the recors form vsam file to db2 table tru file aid
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
Can we change the password using ALTER? anyone tried and changed?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
What is Pic 9v99 Indicates in COBOL?
What is cobol?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
How do get the result of your program directly on your pc?
What is perform what is varying?
What is the Purpose of Pointer in the string?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
Define cobol?