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 search and searchall?what is the diffrence between them?give an best example?

6923


What is a scope terminator give example?

1156


What is the Purpose of Pointer in the string?

1125


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

3049


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.

1501


Write a cobol program making use of the redefine clause.

1228


i need a small 3d program using inline and outline.

2262


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

2521


How to know whether the module is dynamical or statistical?

1212


What is the difference between comp and comp-3 usage?

1258


What are literals?

1184


Difference between cobol and cobol-ii?

1343


What rules are followed by the search verb.

1196


How do get the result of your program directly on your pc?

2395


For rewrite, why is it mandatory that file needs to be opened?

1151