For better readability, ``++END++`` statements must have the same indentation level as their matching opening ``++PROCEDURE++``, ``++SELECT++``, and ``++DO++`` statements.


This rule does not verify the alignment of the compound statements ``++DO ... END;++`` (type 1) and ``++BEGIN ... END;++``. They are mostly used together with the ``++IF++`` and ``++ON++`` statements and are subject to different indentation rules.


== Noncompliant Code Example

----
foo: proc options(main);
  declare i fixed decimal init (0);

  do i = 0 to 9;
    if i = 0 then /* The do was forgotten here */
      put list ('Initialization...');
      put list ('i = 0');
      end; /* Non-Compliant - should be aligned with the DO statement */
  end; /* Non-Compliant - should be aligned with the PROCEDURE statement */

/* The procedure's end seems to be missing */
----


== Compliant Solution

----
foo: proc options(main);
  declare i fixed decimal init (0);

  do i = 0 to 9;
    if i = 0 then do;
      put list ('Initialization...');
      put list ('i = 0');
    end; /* This end's alignment is not verified by this rule */
  end; /* Compliant */
end; /* Compliant */
----

