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

wirte a pgm in using files in which we hav 10 ,20,30 40...100
records in inputfile and i want them to be send to outputfile
in reverse order.
PLZ HELP ME OUT .........THIS IS A RECENT QUESTION IN IGATE..

Answer Posted / quasar chunawala

However, if there are a fixed no. of records, as you have
mentioned in the question - which may not always be the
case with Production Files(They may contain millions of
records), you may follow this approach.

1. Read all the records into a COBOL array(table) A
(1,2,...10).
PERFORM VARYING I FROM 1 BY 1 UNTIL I>10
READ INPUT-FILE
MOVE INPUT-RECORD TO WS-RECORD(I)
END-PERFORM.

2. Print the data from the COBOL Array into Output-file.
PERFORM VARYING I FROM 10 BY -1 UNTIL I<1
WRITE WS-RECORD(I)
END-PERFORM.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the configuration section of a cobol program with examples of syntax.

1195


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

1147


Name the sections present in data division.

1238


Explain what you understand by passing by value.

1149


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

2143


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

2018


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1244


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2374


Have you used comp and comp-3 in your project? And how?

2479


What is rmode(any) ?

1258


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

2073


Why occurs cannot be used in 01 level in COBOL?

1157


What do you understand by psb and acb?

1119


How are the next sentence and continue different from each other?

1292


example for sub strings ? and refernce modifications whit output pls

2315