how to pick up variable set from bash_profile in Linux

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf how to pick up variable set from bash_profile in Linux

  • Creator
    Topic
  • #51676
    Highland Dave
    Participant

      Have three Cloverleaf (Cl) environments that each process to a corresponding Mainframe environment.  I need to keep the tcl code in-synch, cannot have separate code for each Cl system.

      As an example for the development system, thought I could create a Linux value such as Process_env=Dev

      This would be exported, just like the PATH variable from the bash_profile.

      Depending on the Cl system interface, I need to ftp a charge file with the correct mainframe dataset prefix.  Processing_env=Dev would prefix INSTALL as the dataset prefix.

      I’m having trouble picking this up in a Tcl and I also know that I will have a TPS that will need this.

      I was initially trying to process commands within a script window, within the Tcl or hcitcl prompts, to see what I would want the code to execute.

    Viewing 5 reply threads
    • Author
      Replies
      • #71229
        Robert Gordon
        Participant

          I’m sure everyone has heard of the first proc in tcl called hello world.  With the tips tester your can do the same the commands are documented and can be found in the help file for “Tcl Pro”.  Go to google type “Tcl Pro” click on the first link; on the page that follows click on “Free Keys”.  Get a lifetime license, install it on your workstation, use the help file to get the information you need.  I could just give you the answer, and charge everyone thousands for a tcl class, but then again I’m only one person and a limited resource.  The best thing would be to tell you how you can find solutions within tcl itself.  Good luck and happy tcl’ing.

          p.s.: “Half the answer is looking into the info command”

        • #71230
          Chris Williams
          Participant

            Since you are running under Linux, you will want to set up an environment variable for the hci user in ~/.profile.local.end that would read like

            Code:

            export XYZ=INSTALL

            then inside your tcl routine you can access it as a global variable

            Code:

            global env
            $env(XYZ)

          • #71231
            Robert Gordon
            Participant

              This works but now you have to create ump-teen different logins to hold one variable, related to each site this person has…

              I hope he has full unix rights to create all the users and then have them for cron…

            • #71232
              Chris Williams
              Participant

                How many users would there be running hciengine on each box? If the engine itself is running under multiple user accounts, then put the variable in /etc/profile and it will cover all users.

              • #71233
                Highland Dave
                Participant

                  Since we will eventually have separate signons, the hci profle would not be a good option.  THe /etc profile does want is wanted.  We had the environment value set in both areas to get an idea how this works, with different access.  A bit more documentation would be nice.

                  Appreciate the feedback.  Thanks.

                • #71234
                  Russ Ross
                  Participant

                    Here is the approach I took to solve setting an environment variable to tell a batch integration how to handle itself.

                    In my case, the environment variable I used is called

                    MDA_BATCH_ENV

                    I have a script in my master site called

                    /quovadx/qdx5.6/integrator/mda_global/scripts/do_function.ksh

                    which currnetly looks like this:

                    #!/usr/bin/ksh

                    function set_IGNORE_VMFULL {
                    [code]#!/usr/bin/ksh

                    function set_IGNORE_VMFULL {

                    Russ Ross
                    RussRoss318@gmail.com

                Viewing 5 reply threads
                • The forum ‘Cloverleaf’ is closed to new topics and replies.