Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

A table has two indexes defined. Which one will be used by the SEARCH?

1230


Discuss about changing dataset name in proc.

1173


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...)

2337


What are the different rules for performing sort operation?

1155


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

1145


What is inspect in cobol ?

1241


What is perform what is varying?

1111


Can we change the password using ALTER? anyone tried and changed?

1951


What is the difference between binary search and sequential search?

1044


Write the code to count the sum of n natural numbers.

1143


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

9018


What is redefines clause in COBOL?

1249


Mention the guidelines to write a structured cobol program?

1028


what is search and searchall?what is the diffrence between them?give an best example?

6666


Can we redefine the field of x(200) to less than 200?

1307