If you really want to use sendkeys, you could create a windows scripting host object in your COBOL and feed it a sendkeys script created by your COBOL program. Other folks have had success (albeit ugly success) by using the SendMessage API to accomplish the same thing in a more controlled way.
Generally, I try to avoid SendKeys especially in a production environment. It relies too much on having the target window active and also has some timing-related problems.
Regards.
Glenn