View previous topic :: View next topic
|
Author |
Message |
Tone
New User
Joined: 01 Oct 2008 Posts: 12 Location: India
|
|
|
|
Hi
I would like to use have a "list of number" included in DB2 query embedded in COBOL program for assigning a unique identifier.
Could anybody help me with how to include & use a DB2 sequence in a COBOL program ?
Thanks
Tone |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Possibly i misunderstand. . .
What does "how to include & use a DB2 sequence" mean?
Many applications have a separate table that supports assigning "the next number". |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
1. Can you use more than one sentence to explain your requirement ?
2. Are you sure this is a COBOL question and not a DB2 question ? |
|
Back to top |
|
|
Tone
New User
Joined: 01 Oct 2008 Posts: 12 Location: India
|
|
|
|
I am using COBOL program to fetch records using a cursor and insert into a new DB2 Table-A. In doing so, I need to assign a unique identifier to each record before inserting into Table-A.
I have a predefined set of unique identifiers with me for this. This list of identifiers are so huge that I cannot insert into a DB2 table and use it. So I will be using a DB2 sequence to generate it.
Because of the nature of the identifier, I can't use an internal table or program level incrementation to generate the number.
But I am not sure How to use a DB2 sequence in cobol program.
How do I use it in a cursor along with other tables ? how to get the next value ?
Please let me know if furthur info is required ?
Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
|