Another example or situation where we use ENTRY
Entry Statement can be used something like when you want to have a secondry Entry in a given procedure:
PROC1: Proc main
dec i bin fixed(15,0) static;
dec j bin fixed(15,0) Static INIT '5';
dec k bin fixed(15,0) Static INIT '6';
I = J + K;
ENTRY : ENTRY1
PUT SKIPLIST (I);
In the above senario you can enter the procedure at a point other than the begining of it.
When the procedure is enterted at ENTRY1 ,it still has the same environment as if it had been entered at PROC1.(i.e all the variables or names declared in PROC1 are known in ENTRY1 too.
Here the RETURN statement is necessary to return control back to the point of invocation,If not then it would bypass the ENTRY and continue to End statement