Using the built in parameters will always take what is set on the server. So you have two options.
1) create a unique variable in the profile and use that in the cmd task
2) update the actual PMSourceDir to what you want to use.
You have not mentioned what product you are using, so where you change the PMSourceDir is different depending on the product.
we are using informatica 10.1.1 powercenter. Customer has two environment. One of the environment was build a few year ago and uses $PMSourceFileDir vaiable to pick the parameter files. The other environment is build now. Customer wanted to replicate the same config as it used to be in the old enviroment.
Since your confirmation, i will look more into the workflow logs to figureout the behaviour. Thanks for sharing the feedback. I will get back with more details.
$PMxxx variables are defined for each Integration Service in Administrative Console.
If you have more than one Integration Services (for example, Grid_IS, node_IS) each can has own value. .
So it is bad idea to define these variables as global in user profile.
$PMSourceFileDir - and other $PMxxx - are "service process built-in variables." The PCIS process they were defined for in Admin Console (i.e. PC IS processes tab), and its tasks, are the only ones aware of them.
They are not OS' environment variables and they cannot be set from the OS user's profile.
If you define an OS environment variable for the OS user running the PCIS, even though the PCIS is aware of such environment variable, it's not going to make it "usable" by its tasks directly.
There are exceptions, though: command and pre/post session tasks. Since they are run directly by the shell, they are also aware of the OS user's environment. This could be used to create a parameter file dynamically, and pass the "value" of the environment variable on to the task as a session variable.
There is an example here, which might help you in what you are trying to achieve:
thanks for helping on this. Customer shared the variables snapshot from different integration service, hence causing the confusion. Thankyou informatica community for support and help.