Hello,
I am trying to set a variable in my job that is called from CTM. I use these lines of PS, but could really be in any lang.
$exe = "F:\Program Files\BMC Software\CONTROL-M Server\Ctm-server\ctmvar.exe"
&$exe -action set -var "%%\PARM44" -varexpr "UP"
This should call CTMVAR and set its value to "UP". I then use this variable in the body of an DO EMAIL sent by CTM.
I do pass %%PARM44 into my script as an arg.
Any ideas ????????????????
--Goo
Setting variable from job with CTMVAR
I have answered my question on my own last night.
$exe = "F:\Program Files\BMC Software\CONTROL-M Server\Ctm_server\Exe\ctmvar.exe"
&$exe -action set -var "%%\PARM46" -varexpr "DOWN"
This example is in Powershell but could be easily done in DOS too.
Now I can set varibles to any value (<4000 char) and pass back to CTM and use, in my case as a dynamicaly built email body with specific information from my job script. Such as rows, columns, errors, etc.
--Goo
$exe = "F:\Program Files\BMC Software\CONTROL-M Server\Ctm_server\Exe\ctmvar.exe"
&$exe -action set -var "%%\PARM46" -varexpr "DOWN"
This example is in Powershell but could be easily done in DOS too.
Now I can set varibles to any value (<4000 char) and pass back to CTM and use, in my case as a dynamicaly built email body with specific information from my job script. Such as rows, columns, errors, etc.
--Goo