Our one of program taking maximum CPU time which is the primary function of the program.
We have one Cobol-Db2 program, Cursor is defined to select the data from table based on purge date which is coming from input date file and then data being purged based on the selected rows. In this program, there in only one input file to read the date and that date is compared with table’s Purge date. There is no impact on COBOL coding and it only lies with DB2 table. i.e. program selecting approximately 33 lakh rows from table and taking more CPU time while fetching each row at a time and then purging.