I am missing something very basic. This works in Pan6:
Fileglobal GS300
GS300 = 3
Field «DateRef»
FirstRecord
Loop
Loop
DownRecord
Until 12
If «DateRef» ≠ zeroblank(0)
InsertRecord
Endif
Until GS300
But in PanX it stops after inserting one record. It only works if the last line is Until 3