View previous topic :: View next topic |
Author |
Message |
fab01 Beginner
Joined: 28 Feb 2005 Posts: 4 Topics: 2
|
Posted: Mon Feb 28, 2005 4:03 am Post subject: Alternate index and dupkey |
|
|
Hi everybody !
here's a JCL for creating an aix with nonunique keys
Code: |
DEFINE AIX ( NAME(CHTA.CVP.MJNL.AIX.P1) -
RELATE(CHTA.CVP.MJNL) -
KEYS(06 69) -
TRACKS(1 1) -
SHAREOPTIONS(2 3) -
NONUNIQUEKEY -
UPGRADE -
) -
DATA ( NAME(CHTA.CVP.MJNL.AIX.P1.DATA) -
CONTROLINTERVALSIZE(4096) -
FREESPACE(10 1) -
) -
INDEX ( NAME(CHTA.CVP.MJNL.AIX.P1.INDEX) -
CONTROLINTERVALSIZE(2048) -
)
BLDINDEX INDATASET(CHTA.CVP.MJNL) -
OUTDATASET(CHTA.CVP.MJNL.AIX.P1) -
EXTERNALSORT WORKFILES(WORKAIX1 WORKAIX2)
DEFINE PATH(NAME(CHTA.CVP.MJNL.PATH.P1) -
PATHENTRY(CHTA.CVP.MJNL.AIX.P1) )
|
This AIX is attached to cics file which name is MJXB
It seems t work well because the retrun code is = zero when i 'sub' the jcl
But i have got problem when usign this file
When i start browse and read next MJXB, i ve got DUPKEY
I don't understand why i ve got dupkey because the AIX is declared as NONUNIQUE key.
The DUPKEY error is:
an error or is a warning ?
The DUPKEY error is always on all AIX files with non unique keys ?
Could you help me ?
Thanks by advance.
Sorry for my frenchie english  |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Feb 28, 2005 8:45 am Post subject: |
|
|
fab01,
I guess you are confused with the term NONUNIQUEKEY
NONUNIQUEKEY specifies that the alternate key value might be the same for two or more data records in the base cluster.
Now when you did a READNEXT, you got a Dupkey error as a record is retrieved by way of an alternate index with the NONUNIQUEKEY attribute, and another alternate index record with the same key follows
Hope this helps...
Cheers
Kolusu
PS: This topic should be in the CICS forum rather than a DB2 forum. I am moving the topic to CICS forum. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
fab01 Beginner
Joined: 28 Feb 2005 Posts: 4 Topics: 2
|
Posted: Mon Feb 28, 2005 9:47 am Post subject: |
|
|
Thanks a lot.
I'm agree with you tha NONUNIQUEKEY specifies that the alternate key value might be the same for two or more data records in the base cluster.
So finally, it is normal that i ve got DUPKEY. ? |
|
Back to top |
|
 |
gharisankar Beginner

Joined: 10 Jul 2004 Posts: 19 Topics: 3 Location: C/O Platform - Mainframe
|
Posted: Mon Mar 07, 2005 8:19 pm Post subject: |
|
|
Yes, This is Normal If your VSAM has NONUNIQUEKEYS. If you want to nullify the error, you have to HANDLE the DUPKEY condition.
Evaluate the EIBRESP after READNEXT, the NORMAL and DUPKEY validations should be same. please correct me if I am wrong. _________________ Regards
Hari  |
|
Back to top |
|
 |
suma Beginner
Joined: 23 Jan 2006 Posts: 65 Topics: 29
|
Posted: Wed Apr 15, 2009 8:10 am Post subject: |
|
|
does anyone worked on browsing a file using alternate key? and handled DUPKEY condition?
Please let me know ..how can we browse using alternate key when there is NONUNIQUEKEYS in the vsam file defination?
thanks
Suma |
|
Back to top |
|
 |
|
|