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

I have two files , file1 is input file it contains
10,20,30,....,records
but i want to display the records in file 2 as reverse order
.how can we do by using jcl& cobol(dont use array)
please any one can tell me the answer

Answer Posted / abhishek

First open file-1 as:

OPEN INPUT FILE-1 REVERSED

->If REVERSED clause is specified at the time of opening a
particular file, then that file can be read in reverse
direction.

Now we can read file-1 like
READ FILE-1
INTO ws-record
NOT AT END
PERFORM PARA-1
END-READ

PARA-1
WRITE FILE-RECORD
FROM WS-RECORD
END-WRITE

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

2460


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

1078


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

1417


Mention the guidelines to write a structured cobol program?

1072


example for sub strings ? and refernce modifications whit output pls

2298


How arrays can be defined in COBOL?

1191


What is rmode(24)

1120


What is the difference between next sentence and continue in cobol programing language?

1196


What is Pic 9v99 Indicates in COBOL?

1238


What are declaratives and what are their uses in cobol?

1184


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

2451


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

2356


What is the difference between Call and a Link?

1174


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

2198


how can i see junk values in dclgen or in hostvariable of comp ?

2982