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

Static vs dynamic in cobol-db2


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Sat Jun 04, 2011 2:32 am
Reply with quote

In past I have read some stuff on static vs dynamic in cobol. Its always been performance comparison in most of them.

One of my colleague asked few questions regarding the impact of both calls incase of Cobol-db2 programs. The programs are Cobol-DB2 and which call handles abends more efficiently when a roll back of the tables is neccessary.

Will it be a good idea to change from Static to Dynamic.

1. Would a Static call roll back all tables that were used in all called programs?
2. Would a 'Dynamic' roll back all tables that were used in all tables throughout all programs or because its a dynamic call the roll back would only occur in the one program where the abend occurred.

I tried searching for it though and couldn't find.

Finally, it could also be the case that db2 is completely independent of type of cobol calls. Could the experts provide your inputs please.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jun 04, 2011 3:20 am
Reply with quote

Hello,

Quote:
I tried searching for it though and couldn't find.
This is a database consideration, not "code-calling" concern.

Suggest you talk with your dba or a project senior about what is a "logical unit of work".

When a process has done some database inserts/updates/deletes, and a rollback is issued, everything since the last checkpoint/commit is rolled back - the processing between checkpoints is one logical unit of work.

When an abend occurs or a task issues a rollback, everything for the current logical unit of work is rolled back. This has nothing to do with how verious modules were called.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Jun 04, 2011 3:22 am
Reply with quote

Statically CALLED sub-programs, raise the issue of non-reentrancy, a problem which will eventually cause grief in CICS, especially if you migrate to Threadsafe.

If you do pursue with a Statically CALLED sub-program, you must pass the Caller's Reentrant Working-Storage to the Statically CALLED sub-program for its usage.

Bill
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top