0

I need the exact syntax to call a .ksh script as part of MQFTE presource call.

I am aware of the -presrc argument in the fteCreateTransfer command, but need to know how to use this -presrc argument to call a korn shell script(.ksh) or a shell script(.sh)

Ramchander
  • 17
  • 2

1 Answers1

0

Does this help? Although below command is for Windows, I am sure you will be able to modify it to suit Unix. I don't have access to a Unix box to try it.

fteCreateTransfer -sa HA2 -sm MFTDEMO -da TARGET -dm MFTDEMO -de overwrite -df C:/MFT/fl1-3.jpg C:/temp/fl1-3.jpg -presrc executable:hello.bat

The hello.bat contains the following:

copy c:\temp\fl1-1.jpg c:\temp\fl1-3.jpg

You need to set the commandPath property in source agent's agent.properties file to point to the path where the shell script exists. For example:

commandPath=C:\\Scripts
Shashi
  • 14,980
  • 2
  • 33
  • 52
  • Is there a way that we can pass a variable (e.g. a reference to the transferred file) to the executable script? (Something similar to variable substitution in the resource monitor) – Sam Jun 30 '21 at 04:11
  • You can pass parameters to the executable script - https://www.ibm.com/docs/en/ibm-mq/9.2?topic=reference-examples-using-ftecreatetransfer-start-programs – Shashi Jul 01 '21 at 08:51