in cobol i have one file it contains records like
10,4,23,98,7,90..... total records 100. iwant 10 to 20 in
reverse order in cobol environ ment any one please give the
answer......
Answer Posted / ramesh kumar
let me explain the ans for if the file is PS.
fist compute the value 100-80 into one ws-variable.
then read the file and add 1 to some ws-count variable upto 20th record then check for the conditon if it is 20th record
like if ws-variable = ws-count
if it is then write into o/p rec, now decresae 1 from ws-variable like subtract 1 from ws-variable
and read file again add 1 to ws-count then check for the conditon if it is 19 recrd then write into o/p rec.
perform until ws-variable=0.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
how can i see junk values in dclgen or in hostvariable of comp ?
What is an in line perform? When would you use it? Anything else you wish to say about it.
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
Define cobol?
how do you reference the ksds vsam file formats from cobol programs
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
What is the use of intialize verb?
In COBOL programming, what is PERFORM? What is VARYING?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
How do define dynamic array in cobol.
Write a program that uses move corresponding.
For rewrite, why is it mandatory that file needs to be opened?
What rules are followed by the search verb.
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?