hy gary i can help with a custom application, that will scan your code and identify operations ( by searching for home positions, etc ), then allow you to reorder them

for drilling, just use your cam as it is, and is posible to detect the faulty drill operation and corect the syntax to suit your machine, as long as enough data is there

as long as you know what g-code should be there, i can help you reach it / kindly