Originally posted by: LaurentB
That depends on the version you are running.
In 8.1 there is the function resourcelib->getresourcealias, which takes the mrc name and the resource value (enclosed in % signs) as it 2 arguments, and returns the resource value.
In all other versions, you could "hack" the system a bit by using the BAT/SHL adapter to issue an echo %myresource% command. This way, the resource manager will translate the resource value before handing the command string to the adapter, and the actual command will become "echo This_is_the_value_of_the_resource". There is a pitfall if doing so on a Unix platform and running multiple maps in parallel, due to large memory utilization in this case, so a better way to do it on Unix would be to use the EXIT function .
A mapping rule like this one shoudl do the trick :
=IF(MID(GETDIRECTORY(), 1, 1) = "/", EXIT("echo", "| " + Command, " "), GET("BAT", "cmd /c" + Command))
As Janhess suggested, there's also the option to get the resource from a card, but the issue might be to identify the proper VirtualServer.
Hope this helps
Laurent
#DataExchange#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender