Versions Compared

Key

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

...

Anchor
1154432
1154432
Syntax

...

exec

...

{

...

logical

...

-name

...

|

...

host

...

-name

...

}

...

{cmd=

...

command

...

|

...

cmdref=

...

command

...

-ref

...

|

...

stc=

...

started

...

-task

...

}

...

[user=

...

userid

...

]

...

[pwd=

...

password

...

]

...

[port=

...

port

...

]

...

[codepage=

...

codepage

...

]

...

[file=

...

filename

...

|

...

xfile=

...

filename

...

[key=

...

key

...

]

...

]

...

[option=

...

option

...

]

...

[mergelog=

...

yes

...

|

...

no

...

]

...

[trace=

...

yes

...

|

...

no

...

]

...

[input=

...

data

...

-element

...

]

...

[svropt=

...

server

...

-options

...

]

...

[stdout=

...

data

...

-element

...

]

...

[stderr=

...

data

...

-element

...

]

Description

The exec command executes system commands on remote machines if you have Universal Command (UCMD) Manager on the same system with the UDM Manager.

...

Use the following script snippet (or something similar) to exit based on a comparison of _execrc to _halton:

Panel


exec cmd ...
if $(_execrc) GE $(_halton)
   set _rc=$(_execrc)
   exit
end


(See Remote Execution Requirements for more detailed information.)

...

The following example uses the exec command to execute a simple directory listing on a Windows machine that is part of a transfer session:

Panel
exec winmachine cmd="dir c:\"


The following example uses the exec command to invoke a started task:

Panel
exec mvsmachine stc="mytask,parm=$(TASK_PARM)"


The following example calls the exec command that uses a data element for input to the remote command:

Panel


# Define the data element
 
data shellinput
  echo "Comparing $(_file) with $(_file).old:"
  diff $(_file) $(_file).old
  exit
end

# Rename all existing files on the destination

forfiles dst=*
  rename dst $(_file) $(_file).old
end

# Copy the new files over and compare them*

forfiles src=*
  copy src=$(_file)
  exec dst cmd="sh" input=shellinput*
end


Additional Information and Examples

...