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

Change the partition integer dynamically in COBOL DB2 pgm


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shrinivasabharathi_b

New User


Joined: 04 Nov 2008
Posts: 11
Location: Chennai

PostPosted: Thu Nov 13, 2008 11:46 am
Reply with quote

EXEC SQL
LOCK TABLE WRKSHT PART integer IN EXCLUSIVE MODE
END-EXEC

Is there a way to change the partition integer dynamically in COBOL DB2 program?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Nov 13, 2008 1:05 pm
Reply with quote

in db2 you do not 'change' anything, you UPDATE or ALTER. Try using those words in your searches.
Back to top
View user's profile Send private message
shrinivasabharathi_b

New User


Joined: 04 Nov 2008
Posts: 11
Location: Chennai

PostPosted: Thu Nov 13, 2008 1:13 pm
Reply with quote

I need to get the exclusive lock for 50 partitions in a table as shown below.

Part1:
EXEC SQL .
LOCK TABLE WRKSHT PART 1 IN EXCLUSIVE MODE
END-EXEC

Part2:
EXEC SQL
LOCK TABLE WRKSHT PART 2 IN EXCLUSIVE MODE
END-EXEC

--
--
--

Part50:
EXEC SQL
LOCK TABLE WRKSHT PART 50 IN EXCLUSIVE MODE
END-EXEC


Is there any possibility of using the working storage variable in the place of partition number or
Is there a way to give ranges.
for ex: 1 to 7, 7 to 15....
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 -> DB2

 


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