The /ENDIF compiler directive is used to end the most recent /IF, /ELSEIF or /ELSE group.
In fixed-form, /ENDIF must begin in column 7. 
/ENDIF can be specified within
any free-form statement other than a free-form calculation statement.
Within free-form statements, /ENDIF can begin in
column 8 or later.
See Conditional Directives Within a Free-Form Statement. 
The remainder of the line containing /ENDIF
must be blank. 
Following the /ENDIF directive, if the matching /IF directive was a selected line, lines are unconditionally selected. Otherwise, the entire /IF group was not selected, so lines continue to be not selected.