rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
I was trying sample secondary index creation on HDAM Database, sec. index i tried on ORDRDET segment - ORDRID field. Target and source both belong to same segment and same field. While loading 1st segment into ORDRDET, am coming across below issue - duplicate insert error. I am not sure why duplicate insert error is shown when there is not a single previous insert for the segment/database record.
Error:
Code: |
+DFS0840I INDEX ERROR CMPHDMSC NI 11111
+DFS0832I ABEND U0826 REASON CODE N/A DATABASE |
DBD main database:
Code: |
DBD NAME=CMPHDMSC,ACCESS=HDAM,RMNAME=(DFSHDC40,3,2048,2048)
DATASET DD1=COMPDS,DEVICE=3390
SEGM NAME=COMPINFO,BYTES=20,PARENT=0
FIELD NAME=(COMPKEY,SEQ,U),BYTES=04,START=1
FIELD NAME=COMPNAME,BYTES=10,START=5
FIELD NAME=COMPADDR,BYTES=06,START=15
SEGM NAME=PARTDET,BYTES=20,PARENT=COMPINFO
FIELD NAME=(PARTKEY,SEQ,U),BYTES=05,START=1
FIELD NAME=PARTNAME,BYTES=15,START=6
SEGM NAME=ORDRDET,BYTES=15,PARENT=COMPINFO
FIELD NAME=(ORDRID,SEQ),BYTES=05,START=1
LCHILD NAME=(X1SEG,CMPHDMSI),PTR=INDX
XDFLD NAME=ORDRIDX,SRCH=ORDRID
FIELD NAME=ORDRDATE,BYTES=10,START=6
DBDGEN
FINISH
END |
Secondary index DBD:
Code: |
DBD NAME=CMPHDMSI,ACCESS=INDEX
DATASET DD1=COMPDSI
SEGM NAME=X1SEG,BYTES=05,PARENT=0
FIELD NAME=(ORDRIDIX,SEQ,U),BYTES=05,START=1
LCHILD NAME=(ORDRDET,CMPHDMSC),INDEX=ORDRIDX,POINTER=SNGL
DBDGEN
FINISH
END |
Initial PSB:
Code: |
PCB TYPE=DB,DBDNAME=CMPHDMSC,
PROCOPT=L,KEYLEN=14,PCBNAME=CMPPCB1
SENSEG NAME=COMPINFO,PARENT=0
SENFLD NAME=COMPKEY,START=1
SENFLD NAME=COMPNAME,START=5
SENFLD NAME=COMPADDR,START=15
SENSEG NAME=PARTDET,PARENT=COMPINFO
SENFLD NAME=PARTKEY,START=1
SENFLD NAME=PARTNAME,START=6
SENSEG NAME=ORDRDET,PARENT=COMPINFO
SENFLD NAME=ORDRID,START=1
SENFLD NAME=ORDRDATE,START=6
PSBGEN PSBNAME=CMPPSBSC,LANG=COBOL,CMPAT=YES
END |
Have I missed any step while addressing secondary index trial ?
You can help me with your any experience, insights pls which would help me improve my understanding. |
|