Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

executeScript

&pagelevel(3)&pagelevel

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

  1. A script (e.g. bs2000Script, unixScript) may only occupy one line and is limited to 500 characters in length.

  2. You must specify a script which is not empty for the addressed operating system.

Format

 <executeScript ref?="ID" repeatable?="true|false" >  
   comment?
   context?
   script?
   bs2000Script?
   unixScript?
   windowsScript?
   zosScript?
   partner?
 </executeScript>

 

Attributes

Name

Value

Meaning

ref?

string

Reference to a script context object.

repeatable?

true | false

The default value is true. The script may be repeated on a restart.

If false is specified:
The script may not be repeated on a restart. On a restart, the
executeScript activity is aborted with the error code ft_resumeForbidden
if it is not possible to determine whether this script has been
fully processed.
It is only possible to switch the openFT instance during script
execution in the case of scripts with short runtimes (see section “Restart”).

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.