The ENDIF is only used if there are multiple line to to IF
Code:
IF x = 5 THEN
  DO THIS
  DO THAT
ENDIF
You can have multiple IF statements like you have it.
Code:
IF x = 5 THEN LABEL_B
IF x = 15 THEN LABEL_A