Save tclproc to root directory

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Save tclproc to root directory

  • Creator
    Topic
  • #50361
    Gary Atkinson
    Participant

    I have tclproc I would like to save in the root directory ($HCIROOT/tclprocs).  When I go into the script editor that is available via the gui, it only lets you save at the site level that I am connected to.  Is there is way around this?  I checked in the $HCIROOT/tclprocs directory and do see a tclIndex in there.  If I create the tclproc outside of the gui editor and save it in $HCIROOT/tclprocs, how do I update the tclIndex file that is stored at the root level?

    Also, a somewhat related question…How does netconfig find the tclprocs that are stored at the root level?

    thanks!

    Gary

Viewing 12 reply threads
  • Author
    Replies
    • #65761
      James Cobane
      Participant

      Gary,

      Once you put the proc in the $HCIROOT/tclprocs directory, simply change to that directory and run the ‘mktclindex’ command.  Once the tclindex is built, the proc will be accessible to all sites; they’ll show-up in the drop-down list in NetConfig.  One thing to be aware of is that when you upgrade to a new release, you’ll need to manually copy this proc to the new releases’ $HCIROOT/tclprocs directory; the normal ‘site promotion’ process will not move this proc to the new release.

      Hope this helps.

      Jim Cobane

      Henry Ford Health

    • #65762
      Jim Kosloskey
      Participant

      Gary,

      Saving your procs to the HCIROOT can cause you issues on upgrade.

      When upgrading Cloverleaf(R) the HCIROOT/tclprocs directory gets replaced and your procs go away. You would then need to replace them.

      What can be done is to place the procs in another directory and sof link to them from the HCIROOT/tclprocs directory (assuming UNIX). You will ose the links on upgrade, but those are easily recovered.

      If you are on 5.6 or later there is a Master Site feature that will eliminate the need for the links.

      In either case (placing the procs in HCIROOT or linking from HCIROOT) to update the tclIndex just run mktclindex in the HCIROOT/tclprocs directory).

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #65763
      Gary Atkinson
      Participant

      Thanks guys!  We are not going to upgrade to 5.6 anytime soon.  Right now we only one have one site, but I thinking in the future we are going to have more.  I am not too familiar with unix, so I think copying the proc to the root directory and running mktclindex is my best option.

      thanks again  ðŸ˜€

    • #65764
      Tim Pancost
      Participant

      You need to be careful about running mktclindex in the $HCIROOT/tclprocs directory.  Doing so will break any Java UPoC’s you’re using, or won’t allow you to start using them in the future.  The procs that control Cloverleaf’s Java UPoC’s are stored in another directory ($HCIROOT/tcl/lib/tfc).  When you run mktclindex, it only looks in the current directory for files to include.  Therefore, the references to the procs in the $HCIROOT/tcl/lib/tfc directory will be lost.

      Learned this one the hard way…  ðŸ˜³

      TIM

      Tim Pancost
      Trinity Health

    • #65765
      Gary Atkinson
      Participant

      Can the same procedure be save in more than one site?  So, if I have proc named “GARY”, which is stored in site “A”; can I save this same proc “GARY” in site “B”.  I’ve stored some procs in one site that I want to use in another site.

      Or how can I make make site “A” procs *visible* to site “B”?  How does this impact the TclIndex file?

      thx,

      Gary

    • #65766
      Jim Kosloskey
      Participant

      Gary,

      You can have the same proc in multiple sites.

      But then you incur the responsibility of maintaining the same code in multiple sites – not a good idea.

      If you are on Cloverleaf(R) 5.6 there is a Master Site specification which will allow you to share objects (procs are an object) among sites.

      If you are prior to 5.6, you can build your own ‘Master’ site and if on UNIX use soft links (that is what we have done).

      In our case, we did the mktclindex at the root level and experenced no hardship – perhaps because e do not deploy Java for anything ourselves and it does not appear to have harmed anything in Cloverleaf(R).

      We will be utilizing the Master Site facility provided in 5.6.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #65767
      Gary Atkinson
      Participant

      Jim-

      We are on Unix.  Let me see if I have the soft link process down.  Does this syntax look correct

      Code:

      ln -s $HCISITEDIR/tclprocs/example.tcl $HCIROOT/tclprocs/example.tcl

      Then run mktclindex under $HCIROOT/tclprocs

      Question, if I change example.tcl in the $HCISITEDIR/tclprocs this change is also visible in the $HCIROOT/tclprocs?

      thx,

      Gary

    • #65768
      Bob Richardson
      Participant

      Gary,

      I hope my last response did NOT make it to this forum – fat fingered and it went as an incomplete message.

      Ok… try again.

      Given that the common tclprocs directory lives in:

       /quovadx/qdx5.6/integrator/allina_prod/tclprocs

      and that the site which needs to find them is:

       /quovadx/qdx5.6/integrator/allina_prod2

       from this site do:  >ln -s /quovadx/qdx5.6/integrator/allina_prod/tclprocs

       and you should see (doing an ls -al):

       tclprocs -> /alin1hub_site1/qdx5.6/allina_prod/tclprocs

      Note: the master site feature in CIS5.6 works fine EXCEPT (!) that you cannot modify any master site object other than in the master site within

      the IDE !!!   For us this was unacceptable from a productivity standpoint and not what we had envisioned as how the master site needed to be implemented.

      I hope this helps you out.

    • #65769
      Gary Atkinson
      Participant

      With symbolic link in place, which TclIndex file does the engine read?

    • #65770
      Bob Richardson
      Participant

      Gary,

      If all of your sites have the symbolic link that points back to the master site (common site), the search sequence of the engine will be to look

      in the local tclprocs directory first then at the root level.  There is a post somewhere on this Forum for the search sequence details.

      Bottom line: the “local” tclprocs directory for a site is first; the link points to your master site (common site).  You cannot create both a local tclprocs “normal” directory and a link with the same name, that is, tclprocs.  This works for the other shared (common, master) engine files like Xlate, formats, Tables. etc.

      We have used them for years without any problems.

      Hope this helps you out.

    • #65771
      Gary Atkinson
      Participant

      Question on this line:

      Quote:

      You cannot create both a local tclprocs “normal” directory and a link with the same name, that is, tclprocs.

      So, in deploying your method did you have to remove the local “tclprocs” directory that is created when a site is created, before the soft link to “tclprocs” was created?

    • #65772
      Bob Richardson
      Participant

      Gary,

      Yes, remove the local tclprocs directory first otherwise you will see an error that the directory already exists.

      BobR

    • #65773
      Gary Atkinson
      Participant

      Thanks.  I can see all the tclprocs in my new site now.  One more reason for me to push to upgrade to 5.6  8)

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

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,296
Replies
34,439
Topic Tags
287
Empty Topic Tags
10