Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Compound statements

Compound statements are all keyword statements. Each begins with a keyword which indicates the purpose of the statement. A compound statement contains one or more simple or compound statements. There are four compound statements: IF, ON, WHEN, and OTHERWISE. A compound statement is terminated by the semicolon that also terminates the final statement of the compound statement.

The following are examples of compound statements:

  on conversion
    onchar() = '0';

  if Text = 'stmt' then
    do;
      select(Type);
        when('if') call If_stmt;
        when('do') call Do_stmt;
        when('') /* do nothing */ ;
        otherwise
          call Other_stmt;
      end;
      call Print;
    end;
  end;
 
  %if Type = 'AREA' %then
    %Size = Size + 16;
  %else;

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)