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
Have you used comp and comp-3 in your project? And how?
how do you define single dimensional array and multidimensional array in your cobol?
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.
Mention the guidelines to write a structured cobol program?
example for sub strings ? and refernce modifications whit output pls
How arrays can be defined in COBOL?
What is rmode(24)
What is the difference between next sentence and continue in cobol programing language?
What is Pic 9v99 Indicates in COBOL?
What are declaratives and what are their uses in cobol?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What is the difference between Call and a Link?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
how can i see junk values in dclgen or in hostvariable of comp ?