infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
set site from within tcl
John Mercogliano
I'm attempting to run hcidbdump from with in a tcl script against all sites to check the error database for any transactions the previous day. My question is, how do you set the site from within tcl so that hcidbdump will run correctly.
Thanks,
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Anonymous
I use:
eval [exec -keepnewline $HciRootDir/sbin/hcisetenv -site tcl $site]
John Mercogliano
Thanks Matt, it was exactly what I needed.
John Mercogliano
Don't know if anyone has seen this but if you have could someone tell my why this works.
I implemented Matt's solution using eval and it worked great from with in hcitcl or in a .tcl file when called from the top level but when I tried to call it from a function it would not work.
I ended up changing eval to uplevel #0 and it worked again. My question would be, why does hcisetenv need to be run from the root proc.
Thanks,
Rob Abbott
The code sets up the env array, which exists in the root scope. Inside a proc you need to declare it global. Did you
global env
in your proc?
John Mercogliano
That was it. It never dawned on me to global env. I'm used to globaling when I'm interacting directly not indirectly through a system call.
Thanks,