In your self made command, you should define local variables. In this case, you should write "VAR W,H,A" at the top of GARRAY command as follows. COMMON DEF GARRAY D VAR W,H,A :'<- H=400/LEN(D) : :