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

Answers were Sorted based on User's Feedback



I have two files , file1 is input file it contains 10,20,30,....,records but i want to display th..

Answer / 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

I have two files , file1 is input file it contains 10,20,30,....,records but i want to display th..

Answer / rajesh

using count statement

Is This Answer Correct ?    3 Yes 1 No

I have two files , file1 is input file it contains 10,20,30,....,records but i want to display th..

Answer / vaneesh

We can sort the input file in descending order usign DFSORT

sort fields=(1,3,CH,D)

then simply read the sorted file in the program and display
it in the spool.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More COBOL Interview Questions

How do you define a variable of COMP-1? COMP-2?

3 Answers  


What is the Purpose of POINTER Phrase in STRING command in COBOL?

0 Answers   Winsol Solutions,


how to transfer the file from pc to mainframe??

2 Answers  


Discuss about changing dataset name in proc.

0 Answers  


What is cobol?

0 Answers  


explain sorting techniques in cobol program?

0 Answers  


how to display the dataset information?

2 Answers  


What R 2 of the common forms of the EVALUATE STATEMENT ?

1 Answers   Cap Gemini,


If we use GO BACK instead of STOP RUN in cobol?

1 Answers   Temenos,


can we declare occurs in 01 level?

2 Answers   Temenos,


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

0 Answers  


I got user abend U4038 while compiling my runjcl.. can anyone help me?

10 Answers   CGI,


Categories