View previous topic :: View next topic
|
Author |
Message |
sumanthmain
New User
Joined: 22 Aug 2005 Posts: 14
|
|
|
|
Anybody help me about entry statement.
what is the use of entry statement ??
cheers
sumanth |
|
Back to top |
|
|
Sridevi_C
Active User
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
|
|
Back to top |
|
|
hsourabh
New User
Joined: 24 May 2005 Posts: 12 Location: Z?rich
|
|
|
|
Hi,
An entry statement is used to declare an externally called module inside a
PL/1 program.
DCL DONOTHING ENTRY;
or(with arguments)
DCL DOSOMETHING ENTRY(var1) returns(var2);
et al.
It must be noted that any module declared as an entry has to have its loadlib link edited in the JCL step.
Regards,
Sourabh |
|
Back to top |
|
|
nutakkimurali
New User
Joined: 15 Nov 2005 Posts: 22
|
|
|
|
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:
Example:
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;
return;
ENTRY : ENTRY1
PUT SKIPLIST (I);
END PROC1;
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
Muralee |
|
Back to top |
|
|
|