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
What is the difference between goback, stop run and exit program in cobol?
What is the problem of ordered sequential files access?
What is report-item in COBOL?
what are decleratives in cobol?
What is an in line perform? When would you use it? Anything else you wish to say about it.
Discuss about changing dataset name in proc.
example for sub strings ? and refernce modifications whit output pls
What is the difference between Call and a Link?
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...)
What is a report item?
Write a program to enter and display the names of students in a class using the occurs clause.
what is search and searchall?what is the diffrence between them?give an best example?
What are all the divisions of a COBOL program?
What is the difference between structured cobol programming and object alternativelyiented cobol?
how can i see junk values in dclgen or in hostvariable of comp ?