View previous topic :: View next topic
|
Author |
Message |
rajrohith
New User
Joined: 15 Apr 2005 Posts: 54 Location: chennai
|
|
|
|
hai
i have doubt with dynamic call and static call in pl/1
when u look into pl/1 program how can we know that program dynamic or static call using
advance thanks
raj |
|
Back to top |
|
|
arivazhagan_k
New User
Joined: 05 Dec 2007 Posts: 57 Location: chennai
|
|
|
|
Consider the following example, in which ProgA and ProgB are entry names of procedures resident on disk:
Prog: procedure;
1 fetch ProgA;
2 call ProgA;
3 release ProgA;
4 call ProgB;
go to Fin;
fetch ProgB;
Fin:
end Prog;
1 ProgA is loaded into main storage by the first FETCH statement.
2 ProgA executes when the first CALL statement is reached.
3 Storage for ProgA is released when the RELEASE statement is executed.
4 ProgB is loaded and executed when the second CALL statement is reached, even though the FETCH statement referring to this procedure is never executed.
The same results would be achieved if the statement FETCH ProgA were omitted. The appearance of ProgA in a RELEASE statement causes the statement CALL ProgA to load the procedure, as well as invoke it.
The fetched procedure is compiled and linked separately from the calling procedure. You must ensure that the entry constant specified in FETCH, RELEASE, and CALL statements; CALL options; and in function references is the name known on the disk. This is discussed in the Programming Guide |
|
Back to top |
|
|
rajrohith
New User
Joined: 15 Apr 2005 Posts: 54 Location: chennai
|
|
|
|
thanks for ur explanation
its very useful to me
thanks and regards
raj |
|
Back to top |
|
|
|