| Author |
Using numeric variables with jacl
|
|
|
| Inside my jacl script I want to use a variable for an integer value, i.e. this works fine:
>$AdminConfig modify $module1 {{startingWeight 5000}}
this does not work:
>set weight 5000
>$AdminConfig modify $module1 {{startingWeight $weight}}
I get the following error:
com.ibm.ws.scripting.ScriptingException: WASX7088E: Invalid numeric value specified for attribute "startingWeight"
I tried a lot of different things and can't find an example of anybody doing this. I use Websphere 5.0.2 fixpack 1.
Peter.
| |
| p Lall 2005-07-27, 5:57 pm |
| Try something like this
set weight expr[5000+0]
<peter.reinhardt@bnpparibas.com> wrote in message
news:1637618754.1122023643658.JavaMail.wassrvr@ltsgwas007.sby.ibm.com...
> Inside my jacl script I want to use a variable for an integer value, i.e.
this works fine:
>
>
> this does not work:
>
>
>
> I get the following error:
>
> com.ibm.ws.scripting.ScriptingException: WASX7088E: Invalid numeric value
specified for attribute "startingWeight"
>
>
> I tried a lot of different things and can't find an example of anybody
doing this. I use Websphere 5.0.2 fixpack 1.
>
> Peter.
>
| |
|
| I've got the same problem while setting an endpoint port. The port number ist read from a file:
<I>
# read properties from config file (key=value)
set f [open $configfile "r"]
while {[gets $f line] != -1} {
if {![regexp "^\#" $line] && ![regexp "^^ *$" $line]} {
set key [lindex [split $line =] 0]
set value [lindex [split $line =] 1]
set $key $value
}
}
close $f
</I>
... and then use the variable $port to create an endpoint:
<I>
$AdminConfig create NamedEndPoint $server {{endPointName "ORB_LISTENER_PORT"} {endPoint {{host localhost} {port $port}}}}
</I>
The error message is:
<I>
WASX7017E: Exception received while running file "install.jacl"; exception information: com.ibm.ws.scripting.ScriptingException: WASX7088E: Invalid numeric value specified for attribute "port"
</I>
I tried the suggested way from the previous post, but that didn't work:
<i>
set newPort [expr $port+0]
</i>
... returns the same error message.
Do you know any workaround?
| |
|
|
|
|