Universal Data Mover Script Files
Universal Data Mover Script Files
You can execute UDM commands interactively or in batch, depending on the operating system.
On all platforms other than IBM i, the batch method reads the UDM commands from a script file specified by the SCRIPT_FILE option.
z/OS |
SCRIPT_FILE is not specified, the commands are read from the file allocated to the UNVSCR DD statement in the execution JCL. |
---|---|
IBM i |
The script file and member can be specified by position as the first two command parameters or by using the SRCFILE and SRCMBR command parameters. |
The UDM interactive method also can read UDM commands from a script file.
Syntactically, there is no differences in the command structure between the two methods, with the exception that commands in the batch method script files can contain parameters.
Invoking UDM in Batch Mode with Commands from a Script File
To launch UDM in batch from the Windows or UNIX command line, use the SCRIPT_FILE option to specify the filename of the script.
For example:
udm -script script_filename
Scripts also can have parameters, which are specified in the same name=value format of command parameters. To specify options parameters for a script file on the command line, use the SCRIPT_FILE option.
For example:
udm -script copyfiles.udm -options "file=* source=c:\source dest=c:\destination"
In this example, UDM is invoked with a script file name copyfiles.udm. It has three parameters that are passed to the script file:
Parameter |
Value |
---|---|
file |
* |
source |
c:\source |
dest |
c:\destination |
When UDM has finished executing the copyfiles.udm, it will terminate.
The following example shows the same options for a batch execution in z/OS:
For IBM i examples, see Universal Data Mover Manager for IBM i.
Invoking UDM Interactively with Commands from a Script File
You also can invoke scripts directly from the UDM prompt in interactive mode (or as part of a script file itself) using the call command. Any parameters to the call command are passed on to the script being called.
The following example illustrates the call command executing the copyfiles.udm script (as identified in the previous example):
Unlike executing a script from the command line, UDM will not exit automatically when it finishes processing a script invoked using the call command.