Look at using ASCAN() and rethink your logic. Create an array containing the two digit codes and a second one contianing the four-digit codes. Then check the first two digits of the computername and then the four-digit ones.
code:
$two='S01','R01'
$four='0425','0900'
if ascan($two,left(@WKSTA,2))=-1 and ascan($four,left((@WKSTA,4))=-1
; not in either array
else
; in at least one fo the arrays
endif



[ 26. February 2003, 15:48: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.