ENDIF close an if statement. If you use IF alone then you must put each sentence at the right of it: EXAMPLE: IF X==0 THEN DO A; DO B; DO C; ETC With ENDIF you can do this. IF X==0 THEN DO A DO B DO C ... ENDIF