📄 varsrv.script
字号:
shared pool, and the local system's system pool if the request came from local; otherwise, from the originating handle's pool associated with the current request'srequest number, the originating system's shared pool, the local system's shared pool, and the local system's system pool if the request came from remote..br:hp2.Request::ehp2. :xph.LIST REQUEST:exph.:p.:li.:hp2.Goal::ehp2. Retrieve the combined list of variables from originating handle's pool associated with the current request's request number, the local system's shared pool, and the local system's system pool if the request came from local; otherwise, from the originating handle's pool associated with the current request'srequest number, the originating system's shared pool, the local system's shared pool, and the local system's system pool if the request came from remote..br:hp2.Request::ehp2. :xph.LIST:exph.:eul..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.RESOLVE:i3.variable service:h3.RESOLVE:p.RESOLVE allows you to have all variable references in a string resolved totheir values. A variable reference is denoted by surrounding the variable incurly braces, for example, {WebServer}. Recursive and compound variablereferences are allowed (see the examples).:p.Note that you may RESOLVE multiple strings with a single request.:p.Because of this special significance of "{", if you do not want variablesubstitution performed, use a caret, "^", as an escape character for "{"and "^". However, a caret cannot be used as an escape character within a variable reference(see the examples).:p.:h4.Syntax:xmp.RESOLVE &lbrk.SYSTEM | SHARED | HANDLE <Handle> | ASHANDLE <Handle> | REQUEST &lbrk.<Number>&rbrk.&rbrk. STRING <String> &lbrk.STRING <String>&rbrk....:exmp.:p.:xph.SYSTEM:exph. specifies that only variables from the system variablepool should be used to resolve a variable reference.:p.:xph.SHARED:exph. specifies that only variables from the shared variablepool should be used to resolve a variable reference.:p.:xph.HANDLE:exph. specifies that only variables from the handle variablepool should be used to resolve a variable reference. :p.:xph.ASHANDLE:exph. indicates the variable reference should try to be resolved fromthe specified handle's variable pool, its system's shared variable pool, and its system's system variable pool. Variables in a pool earlier in the list override variables in a pool later in the list.:p.:xph.REQUEST:exph. with a request number indicates the variable reference should try to be resolved from the originating handle's pool associated with the specified request number, the originating system's shared pool, the local system's shared pool, and the local system's system pool if the request came from remote; otherwise, will use the originating handle's pool associated with the specified request number, the local system's shared pool, and the local system's system pool if the request came from local. Variables in a pool earlier in the list override variables in a pool later in the list. :p.If a RESOLVE REQUEST request is made without specifying a request number, variableresolution is done in the context of the RESOLVE REQUEST request, itself.:p.If a RESOLVE request is made without specifying :xph.SYSTEM:exph., :xph.SHARED:exph., :xph.HANDLE:exph., :xph.ASHANDLE:exph., and :xph.REQUEST:exph., the behavior will be identical to a RESOLVE REQUEST request being made with no request number specified.:h4.Security:p.&seclvl. 2.:h4.Return Codes:p.All return codes from RESOLVE are documented in :hdref refid=retcode..:h4.Results:p.On successful return, the result buffer will contain results based on whetherthe :xph.STRING:exph. option was specified once or multiple times::ul.:li.If only one string is specified to be resolved, the result buffer will contain theinput string with all variable references resolved.:p.:li.If multiple strings are specified to be resolved, the result buffer will contain amarshalled :xph.<List> of <Map&colon.STAF/Service/Var/ResolveString>:exph. representinga list of the strings with all variable references resolved.The entries in the list will be in the same order that the strings to be resolvedare specified. The map is defined as follows: :table cols='* * * *'.:tcap.Definition of map class STAF/Service/Var/ResolveString:tnote text='Description'.This map class represents a string with all variable references resolved.:thd.:c.Key Name:c.Display Name:c.Type:c.Format / Value:ethd.:row.:c.rc:c.RC:c.&stringObj.:c.:row.:c.result:c.Result:c.&stringObj.:c.:tnote text='Notes'.:p.If all variables in the string are resolved successfully, the "RC" value willbe '0' and the "Result" will contain the string with all variable references resolved.Otherwise, if an error occurred resolving a variable, the "RC" value willcontain the error return code and the result will contain additional informationon the error, such as the name of a variable that could not be resolved.:etnote.:etable.:eul.:p.:h4.Examples:p.For the following examples, assume the following variables are in System1's system variable pool:xmp.a=Partridgeb=Dovesc=Hensd=Birdse=Rings:exmp.the following variables are in System1's shared variable pool:xmp.a=Happyb=Sleepy:exmp.the following variables are in System1's originating handle variable pool :xmp.a=One:exmp.the following variables are in System2's system variable pool:xmp.a=Geeseb=Swansc=Maidsd=Ladiese=Lords:exmp.the following variables are in System2's shared variable pool:xmp.d=Grumpye=Dopey:exmp.and the following variables are in the System1's variable pool associated with handle 71:xmp.a=Dogs b=Cats:exmp.Let's assume the following requests are done from System1::p.:ul.:li.:hp2.Request::ehp2. :xph.staf local var resolve string "{a} {b} {c} {d} {e}":exph..br:hp2.Result::ehp2. :xph.One Sleepy Hens Birds Two:exph.:li.:hp2.Request::ehp2. :xph.staf System2 var resolve string "{a} {b} {c} {d} {e}":exph..br:hp2.Result::ehp2. :xph.One Sleepy Maids Grumpy Two:exph.:li.:hp2.Request::ehp2. :xph.staf local var resolve ashandle 71 string "{a} {b} {c} {d} {e}":exph..br:hp2.Result::ehp2. :xph.Dogs Cats Hens Birds Two:exph.:eul.:p.The following examples show the use of a caret (^) as an escape characterfor "{" and "^". Assume the following variables are in thesystem variable pool for these examples::xmp.h=HiHi=HI^Hi=Hello:exmp.:p.:ul.:li.:hp2.Request::ehp2. :xph.RESOLVE SYSTEM STRING "^{{h}, ^{{h}}, {{h}}, ^^{{h}}, and ^{^{h}}:exph..br:hp2.Result::ehp2. :xph.{Hi, {Hi}, HI, ^HI, and {{h}}:exph.:p.:li.:hp2.Request::ehp2. :xph.RESOLVE SYSTEM STRING "{^{h}}":exph..br:hp2.Result::ehp2. :xph.Hello:exph.:eul.:p.Note that {^{h}} shows that a caret cannot be used as an escape character within avariable reference.:p.Here's an example of resolving multiple strings in a single RESOLVE request.:ul.:li.:hp2.Goal::ehp2. Resolve three different strings in a single :xph.RESOLVE:exph. request..br:hp2.Request::ehp2. :xph.RESOLVE STRING {STAF/Version} STRING {aaa} STRING {STAF/Config/BootDrive}:exph..br:hp2.Results::ehp2. If the request is submitted from thecommand line, the result, in table format, could look like the following assuming novariable named aaa exists::xmp. RC Result-- ------0 3.0.013 aaa0 C::exmp.:eul..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.DELETE:i3.variable service:h3.DELETE:p.DELETE will remove the given variable from the appropriate variable pool.:p.Note that you may DELETE multiple variables with a single request.:h4.Syntax:xmp.DELETE &lbrk.SYSTEM | SHARED | HANDLE <Handle>&rbrk. VAR <Name> &lbrk.VAR <Name>&rbrk....:exmp.:p.:xph.SYSTEM:exph. specifies that you want to delete the variable from thesystem variable pool.:p.:xph.SHARED:exph. specifies that you want to delete the variable from theshared variable pool.:p.:xph.HANDLE:exph. indicates that you want to delete the variable from thevariable pool associated with the specified handle.:p.If options :xph.SYSTEM:exph., :xph.SHARED:exph., and :xph.HANDLE:exph. arenot specified, the variable will be deleted from the variable pool associatedwith the handle of the process that submitted the request unless the requestcame from another machine, in which case the variable will be deleted from thesystem variable pool.:h4.Security:p.&seclvl. 3.:h4.Return Codes:p.All return codes from DELETE are documented in :hdref refid=retcode..:h4.Results:p.The result buffer will contain no data on return from a DELETE command.:h4.Examples:p.:ul.:li.:hp2.Goal::ehp2. Delete the variable WebServer from the system variable pool..br:hp2.Request::ehp2. :xph.DELETE SYSTEM VAR WebServer:exph.:p.:li.:hp2.Goal::ehp2. Delete the variable TestDirectory from the shared variable pool..br:hp2.Request::ehp2. :xph.DELETE SHARED VAR TestDirectory:exph.:p.:li.:hp2.Goal::ehp2. Delete the variable "Bad String" from the process local variable pool..br:hp2.Request::ehp2. :xph.DELETE VAR "Bad String":exph.:p.:li.:hp2.Goal::ehp2. Delete the variable ConfigData from the variable pool associatedwith handle 59.br:hp2.Request::ehp2. :xph.DELETE HANDLE 59 VAR ConfigData:exph.:eul.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -