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
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 |
How do you define a variable of COMP-1? COMP-2?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
how to transfer the file from pc to mainframe??
Discuss about changing dataset name in proc.
What is cobol?
explain sorting techniques in cobol program?
how to display the dataset information?
What R 2 of the common forms of the EVALUATE STATEMENT ?
If we use GO BACK instead of STOP RUN in cobol?
can we declare occurs in 01 level?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
I got user abend U4038 while compiling my runjcl.. can anyone help me?