Hi Mike

Do a debug on this (copy it to a test.kix and run test.kix in debug mode) and check the variable returned. If the machine name is UPPER00 then the variable should be 00 etc.


;************
$wksta=@wksta
$a=substr($wksta,5,2) ;take last two char
$what_rm=val($a) ;change to number

if $what_rm > "30"
AT (4,4) "The variable value is $what_rm"
sleep 3
else
At (4,4) "The variable value is $what_rm"
sleep 3
endif
;******************

Rgds
Don