WebSphere Application Server - Using numeric variables with jacl

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > November 2005 > Using numeric variables with jacl





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Using numeric variables with jacl

2005-07-22, 8:03 am

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.
>



2005-11-14, 5:58 pm

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?

2005-11-17, 6:20 pm

That worked.
Thanks!
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com