This is possible, but the means of execution is quite rudimentary. What it does give though is a means of repeating not just one command, but entire scripts, indefinitely. The method used involves having a script re-execute itself. You need to take care of making the script stop when needed yourself. See below.
At the end of your BTEQ Update script, use the '.RUN FILE=' or '.RUN DDNAME=' command to point to another script to execute (in your case, this would look similar to the first, including the '.RUN FILE=' at the end). In MVS, the JCL would look something like this:
//*
//BTEQ EXEC PGM=BTQMAIN
//SYSIN DD DSN=XXX.YYY.ZZZ(LOGIN),DISP=SHR
// DD DSN=XXX.YYY.ZZZ(FIRSTSQL),DISP=SHR
//DOAGAIN DD DSN=XXX.YYY.ZZZ(REPEATIT),DISP=SHR
//*
FIRSTSQL might look like this:
/* start of FIRSTSQL */
Update SomeTable
Set ColumnX = OtherTable.ColumnY
Where (some conditions)
...
...
/* Run XXX.YYY.ZZZ(REPEATIT) */
.RUN DDNAME=DOAGAIN
/* end of FIRSTSQL */
REPEATIT might look like this:
/* start of REPEATIT */
/* Perform a test here to see if you */
/* need to continue this iteration. */
/* .QUIT if you're all finished, */
/* otherwise... */
Update SomeTable
Set ColumnX = OtherTable.ColumnY
Where (some conditions)
...
...
/* Re-run myself */
.RUN DDNAME=DOAGAIN
/* end of REPEATIT */
I have used this technique successfully in the past. I don't like it, but it works. Hope it helps. Stored Procedures (V2R4) will help get around these problems in the future.