Variable Substitution in WSAdmin: Variables in braces are treated as constants
Just a quick FYI to those of you who are doomed to write WSAdmin scripts, if you use variable names and enclose them in curly braces ‘{‘, then commands will treat it as a constant string and your variables will not resolve to their values.
$AdminTask blah {-file $VariableFileName}
Will cause and error that the physical file “$VariableFileName” could not be found.
To resolve the issue use the subst or list command:
$AdminTask blah [subst {-file $VariableFileName}]
http://www-01.ibm.com/support/docview.wss?uid=swg21254555
Related Posts
- Problem Determination and WebSphere Integration Developer
- Exploring The Contents of a WID Module Project
- WebSphere Process Server Failed Event Manager: “The Recovery Sub-system is disabled.”
- Updates required for WebSphere Integration Developer debugger to work when security is enabled
- WebSphere Integration Developer – Namespaces Cannot Span Projects
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

January 15th, 2009 at 4:08 am
Dan, this is one reason I tend to write my wsadmin scripts in jython rather than Jacl… the syntax is less irritating. Jacl will also eventually be phased out, so it’s worth getting used to jython.