View previous topic :: View next topic
|
Author |
Message |
ManjuMainframes
New User
Joined: 10 Mar 2009 Posts: 2 Location: Pune
|
|
|
|
Hi Guys,
Can anyone describe the difference between Subprogram and Subroutine in Natural?
Thanks,
Manju. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
This is a basic question. It has been answered here before, but the best place to find an answer would be Software AG's fine manuals.
O. |
|
Back to top |
|
|
ManjuMainframes
New User
Joined: 10 Mar 2009 Posts: 2 Location: Pune
|
|
|
|
Ya question seems to be basic and i saw it in the forum discussed. But i am not answered from that discussion anyways. I already referred Software AG's manuals and everything. But not really cleared.
Thanks for the reply O :-)
Manju. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I already referred Software AG's manuals and everything. But not really cleared. |
If you post what you found that was not clear, someone will be able to clarify. . . |
|
Back to top |
|
|
Ralph Zbrog
New User
Joined: 21 Nov 2009 Posts: 58 Location: California
|
|
|
|
Of course there are relatively minor syntactical differences, but the big difference is in the access to the caller's GDA.
A CALLNAT typically has a parameter list by which data is passed into and out of the subprogram. Passing these data fields incurs overhead. Subprograms are intended to be "black boxes", unaware of the caller's environment, and unaware of the caller's GDA.
An external subroutine has access to the caller's GDA. If all the caller's data that is required by the subroutine is defined in the caller's GDA, then no parameter list is necessary, and no overhead is incurred from passing parameters.
If elements of the caller's GDA are required by a subprogram, those elements must be passed as parameters to the subprogram. |
|
Back to top |
|
|
|