Executing an Existing Windows .bat File from zOS
Execute an Existing Windows .bat file from z/OS
This example demonstrates calling a Windows batch file (.bat extension) from a script being executed remotely by UCMD Manager. The Windows CALL command is used to execute a Windows batch file that already exists on the Windows system.
When UCMD Manager is provided a script with the -script option to be remotely executed, it sends the script to the remote UCMD Server. The UCMD Server, in turn, will create a temporary Windows batch file (.bat extension) in the file system to hold the UCMD Manager-provided script. The UCMD Server will then execute the saved batch file using the Windows command processor CMD.EXE.
Since the UCMD Manager script is executing as a Windows batch file, if it needs to call another batch file, it must use the Windows CALL command.
//jobname JOB CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID // JCLLIB ORDER=SBI.UNV.SUNVSAMP //* //STEP1 EXEC UCMDPRC //SCRIPTDD DD * call user.bat //SYSIN DD * -script SCRIPTDD -host hostname -userid username -pwd password /*
SYSIN Options
The SYSIN options used in this example are:
Option | Description |
---|---|
ddname from which to read the script file. The script file is sent to the remote system by UCMD Manager for execution. | |
Host name or IP address of the remote system on which to execute the script. | |
Remote user ID with which to execute the command. | |
Password for the user ID. |
Components
Universal Command Manager for z/OS