Thanks David. I was declaring cursor C1 in two locations in the routine (no C10 though). I have now renamed one of them to C2 and Studio has compiled it without error.

Why would you use GOTOs? There is no good reason to use GOTOs for anything, ever.