Universal Data Mover - while Statement

while Statement

The while statement implements a simple while loop.

Syntax

The syntax of the while statement is:

while expression
...
end


In this case, the loop iterates (executing the commands between the while and end statements) as long as the expression evaluates to a value that is not zero.

If the expression evaluates to a value of zero, code execution picks up at the point immediately following the end of the while loop.

Example

For example:

set n=1
while <$(n) LE 10>
    echo $(n)
set n=<$(n) + 1>
end