Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following table lists all of the statements that can be used in the Universal Data Mover scripting language.
 

...

  1. Comparison
  1. operation.
<li>
  1. Series
  1. of
  1. UDM
  1. commands
  1. that
  1. are
  1. carried
  1. out
  1. if
  1. the
  1. comparison
  1. operation
  1. evaluates
  1. to
  1. true.
<li>
  1. *end*
  1. statement
  1. that
  1. indicates
  1. the
  1. end
  1. of
the
  1. the if
. </ol> A comparison consists of three parts: <ol> <li>
  1. .

A comparison consists of three parts:

  1. Left\-hand
  1. value
<li>
  1. Comparator
  1. (see
) <li>
  1. )
  2. Right\-hand
  1. value
</ol>

The

left\-hand

and

right\-hand

values

can

be

either:

<ul> <li>

  • Variable
  • reference
<li>
  • Variable
  • attribute
<li> Constant </ul>
  • Constant


The syntax is:
 

Statement

Description

if

<ol> <li>

Adds conditional branching of UDM commands.
 
An if statement consists of:

Html bobswift
Html bobswift
Html bobswift
Panel
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:
 

html-bobswift
Panel
<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:
 


html-bobswift
Panel
<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:
 

html-bobswift
Panel
<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:
 

Panel
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:
 


html-bobswift
Panel
<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:
 


html-bobswift
Panel
<pre>
callsub name
</pre>

...




Anchor
1082377
1082377
For an explanation of how these statements are used, see Universal Data Mover Scripting Language.