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

Entry data

Entry constants
Entry variables
ENTRY attribute
OPTIONAL attribute
LIST attribute
LIMITED attribute
Generic entries
GENERIC attribute

The entry data can be an entry constant or the value of an entry variable.

An entry constant is a name prefixed to a PROCEDURE or ENTRY statement, or a name declared with the ENTRY attribute and not the VARIABLE attribute. It can be assigned to an entry variable. In the following example, P, E1, and E2 are entry constants. Ev is an entry variable.

  P:  procedure;
      declare Ev entry variable,
       (E1,E2) entry;

 
  Ev = E1;
  call Ev;
  Ev = E2;
  call Ev;

The first CALL statement invokes the entry point E1. The second CALL invokes the entry point E2.

The following example declares F(5), a subscripted entry variable.

The five entries A, B, C, D, and E are each invoked with the parameters X, Y, and Z.

  declare (A,B,C,D,E) entry,
  declare F(5) entry variable initial (A,B,C,D,E);
  do I = 1 to 5;
    call F(I) (X,Y,Z);
  end;

When an entry constant that is an entry point of an internal procedure is assigned to an entry variable, the assigned value remains valid only as long as the block that the entry constant was internal to remains active (and, for recursive procedures, remains current).


Terms of use | Feedback

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