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 |
what are the paramater we cannot use in procedure?how many instream we can write in single jcl?can we call instream to catalog and ctalog to instream?
Explain complete concept of table handling in COBOL with an example?
COMPUTE X = A * B - C * D and COMPUTE X = (A * B) - (C * D) (a) Are not the same (b) Are same (c) Syntactically wrong (d) Will yield a run time error
What is comp-1 and comp-2?
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 binary search and sequential search?
how we rectify soc4 and soc7 error in project(need real time answer)? please reply
There is a production file which has millions of records in it.The program that uses it ends up with an SOC7 abend.It is sure that the abend is due to some invalid data in the file.Is there any way to debugg the SOC7 abend with out giving displays? I need the record which is cause for the abend.
Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $
What is redefines clause in COBOL?
What is a SSRANGE and NOSSRANGE?
how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please