Alternatives to Create Sequence for DB2 on OS/390 
Author Message
 Alternatives to Create Sequence for DB2 on OS/390

We are using DB2 on OS/390 v 7.1.1 and need to create unique
identification numbers across tables. Several Java and CICS programs
insert rows into different tables. Currently some of these batch jobs
take a while and are creating timeouts for one table where we are
storing the max id number.

We need something like the Oracle sequence where we dont care if some
sequence numbers are lost during a rollback however it is crucial that
the row on a seperate table with the max id number is not locked on

I dont think auto increment columns are usefull since we need the id
number to be unique across several tables. Any suggestions ?

If we have before insert triggers and that trigger gets the max id and
increments it - is there a way to specify that the trigger can commit
and not hold a lock till the calling program commits ?

any alternative that provides the least impact to exsisting programs
that insert data would be gr8.

thanks !

Mon, 18 Jul 2005 00:57:03 GMT
 Alternatives to Create Sequence for DB2 on OS/390



Mon, 18 Jul 2005 07:34:59 GMT
 Alternatives to Create Sequence for DB2 on OS/390
Hi Vikram

also we in our system use this (chapter 2):

Mon, 18 Jul 2005 07:32:56 GMT
 Alternatives to Create Sequence for DB2 on OS/390
Hi Vikram,

   While selecting the MAX of id use UR option that way you dont lock
the table while reading, since you mentioned that its ok if there are
gaps in ID column

eg: select max(id_column) from myschema.mytable with ur
and add one to the number to get the next id ( you can mention in the
select only as max(id_column)+1 )

--Kishore Tummala


> Hi Vikram


> also we in our system use this (chapter 2):


Tue, 19 Jul 2005 01:06:22 GMT
 [ 4 post ] 

 Relevant Pages 

1. Creating DB2 SQL Procedures in DB2 version 6 on OS/390 (June 2000 PUT)

2. z/OS OS/390 DB2 DBA Position available in Dallas, Texas

3. Db2 V7 for z/OS and OS/390

4. desire to move data from OS 390 DB2 to AS/400 DB2 using DTS

5. Table Limit with DB2 Connect to DB2 for OS/390

6. Load data from DB2 in NT to DB2 in OS/390

7. DB2 Conenct & DB2 on OS/390

8. Trigger working in DB2 for NT but not in DB2 on an OS/390-machine

9. DB2 for OS/390 REXX Language Support for DB2 V5.1

10. Import DELimited File Format Files to DB2 for OS/390 Tables with DB2 Connect

11. Frontpage with DB2 Connect to OS/390 DB2 ?

Powered by phpBB® Forum Software