IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reg: modes in Natural


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kavyareddy

New User


Joined: 13 Dec 2008
Posts: 2
Location: Hyderabad

PostPosted: Mon Dec 29, 2008 11:22 pm
Reply with quote

can anyone let me know the differences between the modes in Natural? i.e. the differences between Structured and reporting mode

2)According to the perfomance wise which is better either an external subroutine or a sub program & why?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Dec 30, 2008 11:42 am
Reply with quote

The last chapter of Natural's "Programming Guide" book is called "Reporting Mode and Structured Mode". It covers the differences between the two modes from several points of view.

If you have specific question regarding the issue, please post it here.

For your second question: The is no documented comparison between Natural's Subprogram and Natural's external Subroutine - performance-wise. From my experience, there is no such difference and it is up to your flavour of coding.
Back to top
View user's profile Send private message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Sun Jan 11, 2009 6:21 pm
Reply with quote

Hi Kavya,

For your 2nd question here are my comments

External subroutine can access the GDAs where as the subroutines can not access Globals.



kavyareddy wrote:
can anyone let me know the differences between the modes in Natural? i.e. the differences between Structured and reporting mode

2)According to the perfomance wise which is better either an external subroutine or a sub program & why?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jan 11, 2009 11:11 pm
Reply with quote

He was asking about performance... not variable usage...

O.
Back to top
View user's profile Send private message
Ralph Zbrog

New User


Joined: 21 Nov 2009
Posts: 58
Location: California

PostPosted: Sat Dec 12, 2009 1:53 am
Reply with quote

In this case, variable usage has a direct effect on performance.

Have you ever seen a subprogram call without a parameter list? Unlikely. The CALLNAT statement allows up to 40 parameters and rarely do you see a subprogram without one. When the CALLNAT is executed, Natural checks the lists in the caller and the subprogram to verify that the parameters match in number, format, and length - this is overhead.

What if all the parameters were located in the GDA of the caller? In that case you could change the subprogram to an external subroutine, declare the GDA in the subroutine, and remove the parameter list, thereby eliminating the overhead.

A GDA is a much more efficient way of "passing" data than a parameter list, because the GDA is already available to the called routine - there is nothing to pass.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts IMS DB using Natural Language IMS DB/DC 0
No new posts Negative value - packed field - Natur... Java & MQSeries 0
No new posts Call Natural program with rexx CLIST & REXX 2
No new posts Reg:Displaying the particular month o... All Other Mainframe Topics 4
This topic is locked: you cannot edit posts or make replies. Natural ADABAS Opening with CTS Mainframe Jobs 0
Search our Forums:

Back to Top