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 read records which is in sequential file in reverse
order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my
doubt any one

Answer Posted / abhishek

i am giving you pseudo code of same
suppose we have 5 records

rec-no 1-->10
rec-no 2-->1
rec-no 3-->25
rec-no 4-->35
rec-no 5-->20

read sequential file to get record count of file

close file

define an array whose size is equal to record count of file


open file

read file in loop

move current record of sequential file to last subscript of
array define above ( this can be taken care using perform
varying)

read the array starting from subscript 1 to record count

this will be similar to reading sequntial file in reverse
order.....


thanks,

Abhishek

Is This Answer Correct ?    23 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you define single dimensional array and multidimensional array in your cobol?

1049


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?

1263


input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?

2255


Give some examples of command terminators?

1197


What is the LINKAGE SECTION used in COBOL?

1469


What guidelines should be followed to write a structured cobol prgm?

1090


Explain what you understand by passing by value.

1099


How to use the same COBOL program in Batch and CICS on lines? explain with an example

2329


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

2081


How you can read the file from bottom?

1086


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

5318


What are the different types of condition in cobol and write their forms.

1064


What are the rules of the move verb?

1195


What are various search techniques in cobol? Explain.

1028


What is the local-storage section?

1105