Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Change the partition integer dynamically in COBOL DB2 pgm

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Change the partition integer dynamically in COBOL DB2 pgm
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us