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
how to convert the recors form vsam file to db2 table tru file aid
What is the usage of comp fields in cobol?
what happens if parmparameter passes zero bytes to the program
What are the different rules to perform a Search?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
How do you get the data to code the BMS macro?
What is amode(24)?
How do we get current date from system with century in COBOL?
Can you please let me know the centre name of INS certification in Kolkata.
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
Whats the difference between search & search ALL?
How do get the result of your program directly on your pc?
What is Pic 9v99 Indicates in COBOL?
Write a program to enter and display the names of students in a class using the occurs clause.
How many sections are there in data division in COBOL?