What you could do is have that long piece of code in a seperate .dba file.
Then use the #include command which looks like this
I wouldn't do that if it was just code you would run in a loop. However, this is useful if you have a .dba with a bunch of functions you would want to use.
If it was a bunch of code put it under a label like this
labelname: `<-----------------The ':' tells the compiler it's a label
then put a return at the end of the code so it would all look like this
labelname:
rem random programming stuff
rem more random programming stuff
return
Then in the loop do this:
It will then run all the code and return back to the loop.