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
IF I mention stop run in CICS what happens?
what happens if parmparameter passes zero bytes to the program
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
How do you reference the following file formats from cobol programs?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
Which division and paragraphs are mandatory for a COBOL program?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
example for sub strings ? and refernce modifications whit output pls
What is the Purpose of POINTER Phrase in STRING command in COBOL?
Whats the difference between search & search ALL?
HOw can I get the negative sign while deduct high value from low value
What are the pertinent COBOL
) how do u code after getting data?