there is no proper reply to my question
You are given the exact algorithm to use, and you call it a "worthless suggestion"?
Perhaps you should find a career other than IT, since it is obvious that you are NOT well suited to do ANYTHING related to a computer. If you do not understand algorithms, then you cannot program a computer and hence you should NOT be doing IT activities, especially related to COBOL which requires a good understanding of algorithms.