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 search and searchall?what is the diffrence between them?give an best example?
What is a scope terminator give example?
What is the Purpose of Pointer in the string?
how can i see junk values in dclgen or in hostvariable of comp ?
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.
Write a cobol program making use of the redefine clause.
i need a small 3d program using inline and outline.
Have you used comp and comp-3 in your project? And how?
How to know whether the module is dynamical or statistical?
What is the difference between comp and comp-3 usage?
What are literals?
Difference between cobol and cobol-ii?
What rules are followed by the search verb.
How do get the result of your program directly on your pc?
For rewrite, why is it mandatory that file needs to be opened?