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

What is the difference between goback, stop run and exit program in cobol?

1525


What is the problem of ordered sequential files access?

1111


What is report-item in COBOL?

1096


what are decleratives in cobol?

2211


What is an in line perform? When would you use it? Anything else you wish to say about it.

1022


Discuss about changing dataset name in proc.

1175


example for sub strings ? and refernce modifications whit output pls

2269


What is the difference between Call and a Link?

1123


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 is a report item?

1094


Write a program to enter and display the names of students in a class using the occurs clause.

1157


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

6670


What are all the divisions of a COBOL program?

1148


What is the difference between structured cobol programming and object alternativelyiented cobol?

1189


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

2935