Atenolol can cause a cough, though other blood pressure drugs are more famous for this problem.
However, you need to see your doctor about this, to discuss whether or not the medication is the cause. The reason is that you did have a heart attack some twenty years ago, and cough can also be caused by heart disease.
It is time for a re-check.