The EGL keyword while marks the start of a loop that runs as long as a specified logical expression resolves to true. The keyword end marks the close of the while statement.

while (index < 7)
myRec[index].airport="Airport" + index;
myRec[index].city="City" + index;
myRec[index].state="S" + index;
index = index + 1;
end