...
The following table lists all of the statements that can be used in the Universal Data Mover scripting language.
...
Statement | Description |
---|
if | <ol>
<li> Adds conditional branching of UDM commands. An if statement consists of: Html bobswift |
<li>
<li> the Html bobswift | .
</ol>
A comparison consists of three parts:
<ol>
<li> - .
A comparison consists of three parts: - Left\-hand
<li> Html bobswift | )
<li>
</ol>
<ul>
<li>
<li>
<li> Constant
</ul>html-bobswift
<pre>
if comparison
...
UDM commands
...
end |
</pre>
If the comparison does not evaluate to true, UDM picks up execution from the line after the end statement.
|
else | Provides an alternate path, when used as part of an if statement, if the comparison evaluates to false. The syntax is: Panel | html-bobswift |
---|
<pre>
if expression
...
[else
...]
end
</pre>
|
In this if statement, the parameter for if is an expression. If the expression evaluates to a value that is not equal to zero, the positive branch is taken; otherwise, the negative else statement branch is taken. |
while | Implements a simple while loop. The syntax is:
Panel | html-bobswift |
---|
<pre>
while expression
...
end
</pre>
|
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. |
fordata | Iterates through a data element, once for each line. For each iteration, a variable provided by the user is set to hold the contents of the line in the data element corresponding to the current iteration. The syntax is: Panel | html-bobswift |
---|
<pre>
fordata variable-name=data-element
...
end
</pre>
|
|
forfiles | Iterates through a series of statements for each file found that matches a given file specification. The syntax is: html-bobswift
<pre>
forfiles logical_name=file_spec
[sortby=attribute-name[,ascending|descending]]
...
UDM commands
...
end |
</pre>
|
subroutine | Names a subroutine and defines the script code that becomes associated with that subroutine name. The syntax is:
Panel | html-bobswift |
---|
<pre>
subroutine name
[script line 1]
...
[script line 2]
endsub
</pre>
|
|
callsub | Carries out the work of lines of script associated with a subroutine. The syntax is:
Panel | html-bobswift |
---|
<pre>
callsub name
</pre>
|
|
...
For an explanation of how these statements are used, see
Universal Data Mover Scripting Language.