Every "IF" needs and "Endif". As you vcan see your code is malformed.
code:
IF INGROUP ("MOVED_USERS")
GOSUB gla
ELSE
IF INGROUP ("GRAMPIAN-GRP")
GOSUB gra
ELSE
IF INGROUP ("PANDD-GRP")
GOSUB pan
ELSE
IF INGROUP ("PRIME-GRP")
GOSUB pri
ENDIF

I would suggest simplifing your code by using the "select..endselect" construct.
code:
select
case INGROUP ("MOVED_USERS") GOSUB "gla"
case INGROUP ("GRAMPIAN-GRP") GOSUB "gra"
case INGROUP ("PANDD-GRP") GOSUB "pan"
case INGROUP ("PRIME-GRP") GOSUB "pri"
endselect



[ 12 July 2002, 13:33: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/