5 Replies Latest reply on Mar 26, 2021 12:39 PM by ajaz rahman

    $PMSourceFileDir Override not working

    ajaz rahman New Member

      I have defined and exported $PMSourceFileDir in the user profile

       

      export PMSourceFileDir=\infa_user\source_files

       

      I am using $PMSourceFileDir variable in a commad task. The command task still picks up the default $PMSourceFileDir  instead of  /infa_user/source_files

       

      Please advice what can be done to correct this issue.

        • 1. Re: $PMSourceFileDir Override not working
          user126898 Guru

          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.

           

           

          Thanks,

          Scott

          • 2. Re: $PMSourceFileDir Override not working
            ajaz rahman New Member

            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.

            • 3. Re: $PMSourceFileDir Override not working
              Vlad Ponomarenko Guru

              Hi,

              $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.

              Regards, Vlad

              • 4. Re: $PMSourceFileDir Override not working
                Paolo Moretti Guru

                $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:

                 

                => https://knowledge.informatica.com/s/article/114059

                • 5. Re: $PMSourceFileDir Override not working
                  ajaz rahman New Member

                  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.