Ok, what the heck am I doing wrong here? This script is supposed to look at the 3rd Octet of the IP address and set a variable to indicate the users site. Right now it wants to set $L to Downtown Des Moines every time. It's like it skips the first line after the Select statement.

$ipad = val(LTRIM(SUBSTR(@IPADDRESS0,9,3)))

? "$ipad"

Select
Case "$ipad" = "45" or "46" or "48" or "49" or "50" or "51" or "52" or "53"
$L = "Downtown Des Moines"
Case "$ipad" = "11" or "12"
$L = "Lincoln Regional Office"
Case "$ipad" = "16"
$L = "Battlecreek Regional Office"
Case "$ipad" = "17"
$L = "Portland Regional Office"
Case "$ipad" = "18" and $site = "sea"
$L = "Seattle Regional Office"
Case "$ipad" = "18" and $site = "pho"
$L = "Phoenix Regional Office"
Case "$ipad" = "20"
$L = "Camarillo Regional Office"
Case "$ipad" = "22"
$L = "Salt Lake City Regional Office"
Case "$ipad" = "23"
$L = "Minneapolis Regional Office"
Case "$ipad" = "24"
$L = "Lincoln Processing Center"
Case "$ipad" = "27"
$L = "Santa Rosa Regional Office"
Case "$ipad" = "28"
$L = "Denver Regional Office"
Case "$ipad" = "54" or "55" or "56" or "62"
$L = "Portland"
Case "$ipad" = "32"
$L = "San Diego Regional Office"
Case "$ipad" = "35"
$L = "Freeport Regional Office"
Case "$ipad" = "43"
$L = "Dial In User"
Case "$ipad" = "62"
$L = "VPN Connected User"

EndSelect


? "$L"
? "$ipad"


Any thoughts would be appreciated.

Roger