You use executeScript to run a script.
The script is executed in the target system. If you do not specify a partner then the script is executed on the local system under the user ID of the user who called the Ftscript.
The following command interpreters are used:
Operating system | Command interpreter |
Windows | System call, i.e. an executable file with the specified name is searched for. E.g. to execute a shell command, enter cmd /c. |
Unix system | /bin/sh -c |
z/OS | TSO |
BS2000 | SDF |
Restrictions
A script (e.g. bs2000Script, unixScript) may only occupy one line and is limited to 500 characters in length.
You must specify a script which is not empty for the addressed operating system.
Format
|
Name | Value | Meaning |
| string | Reference to a script context object. |
| | The default value is true. The script may be repeated on a restart. If false is specified: |
Example
<?xml version="1.0" encoding="UTF-8"?> <ftscript version="1"> <context> <list id="partnerList"> <partner name="WindowsP_1" systemType="windows"> <transferAdmission> <ftacAdmission ftacAdmission="FTACADM1"/> </transferAdmission> </partner> <partner name="UnixP_1" systemType="unix"> <transferAdmission> <ftacAdmission ftacAdmission="FTACADM2"/> </transferAdmission> </partner> </list> </context> <foreach listRef="partnerList" selectType="partner" contextObject="partner"> <executeScript> <unixScript><![CDATA[echo hello unix >frg_eis_07/demo.txt]]">" </unixScript> <windowsScript><![CDATA[cmd /c echo 'hello windows' >frg_eis_07\demo.txt]]">" </windowsScript> <partner ref="partner"/> </executeScript> </foreach> </ftscript>
An executeScript is run on the computers in the list partnerList.
Corresponding operating-specific scripts are executed depending on the operating system in question. It is important to specify the operating system in the partner definition.