END

End a routine

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
END 

The END (or .END) statement indicates the termination of main routines, subroutines, functions, and methods. (Main routines, subroutines, functions, and methods can alternatively be terminated with ENDMAIN, ENDSUBROUTINE, ENDFUNCTION, or ENDMETHOD, respectively.)

Although the END statement is recognized with or without a beginning period, we recommend that you don’t include the period.

When you end a routine with the END statement, replacement identifiers (.DEFINEs) remain defined until the entire file is compiled. To change the behavior of the END statement so that it clears all replacement identifiers immediately after the routine is processed, use the end option with the -qrelaxed compiler option.

proc
  .
  .
  .
end
subroutine sub1
proc
  .
  .
  .
end
function func1
proc
  .
  .
  .
end