S
Simon L. Prinsloo
Guest
Hi Peter, For various other reasons beyond the original reason for this thread, in my case mainly from a tooling perspective, I do believe that OS-SETENV() would be a welcome enhancement. For various other reasons beyond the original reason for this thread, in my case mainly from a tooling perspective, I do believe that OS-SETENV() would be a welcome enhancement. The original poster can then fix his problem by using that in the startup procedure of the AppServer, e.g. OS-SETENV('PROPATH',PROPATH). Being able to read the "newer" environment configurations, like oe.props, this way, is also an attractive idea. While we do have a way to get to registry settings, the current mechanism is a bit awkward, in that you cannot assign a value directly to a variable, so improving that access at the same time might be nice. Consider the difference in the following: ASSIGN cMe = OS-GETENV("USERNAME") cHost = OS-GETENV("COMPUTERNAME") cLogfile = ParseProps("Appserver.SessMgr.MyApp:agentLogFile") . GET-KEY-VALUE SECTION "Startup" KEY "PROPATH" VALUE cValue. LOAD "Acme Inc.\AcmeApp". USE "Acme Inc.\AcmeApp". GET-KEY-VALUE SECTION "AppStylistService" KEY "StyleLibrary" VALUE cPref. USE "PSC\" + PROVERSION(0). METHOD PRIVATE CHARACTER ParseProps(pcProperty AS CHARACTER) : ... As opposed to: ASSIGN cMe = OS-GETENV("USERNAME") cHost = OS-GETENV("COMPUTERNAME", "ENV") cPath = OS-GETENV("Startup
ROPATH", "REG") cPref = OS-GETENV("Acme Inc.:AcmeApp:AppStylistService:StyleLibrary", "REG") cLogFile = OS-GETENV("Appserver.SessMgr.MyApp:agentLogFile", "PROP") . or even: ASSIGN cMe = OS-GETENV("USERNAME") cHost = OS-GETENV("ENV:COMPUTERNAME") cPath = OS-GETENV("REG:Startup
ROPATH") cPref = OS-GETENV("REG:Acme Inc.:AcmeApp:AppStylistService:StypeLibrary") cLogFile = OS-GETENV("PROP:Appserver.SessMgr.MyApp:agentLogFile") . I do however believe that these methods of getting to (and setting) the environment are going beyond the pure OS environment, and it might be more appropriate to introduce "GETENV()" and "SETENV()" for this purpose, while re-mapping OS-GETENV(&1) internally to GETENV("ENV:" + &1)...
Continue reading...
Continue reading...