Thursday, March 6, 2008

Idlcall to find TMR region number using region name and vice versa

Here is an useful idlcall that displays the region number for the given region name and vice versa. This will be useful in scripts where we don't need to parse a lengthy wlsconn output.

# displays region number for the given region name
$ irOid=`wlookup -r distinguished InterRegion`
$ idlcall $irOid map_region_name '"tmr1-region"'
1143674623
$

In the above command, the tmrname is enclosed in a double quote and the double quote is enclosed by single quote.

# displays region name for the the given region number
$ irOid=`wlookup -r distinguished InterRegion`
$ idlcall $irOid map_region_number 1143674623
"tmr1-region"
$

In the above command, 1143674623 is the region number of a tmr.

Hope you find it useful.

No comments: