Page 1 of 1

Error Hierarchy sequence error while creating DBD.

PostPosted: Mon Apr 26, 2010 9:31 am
by XY09
Hi All,

I am new to IMS DB. I have created a simple DBD and when i try to run using DBD JCL i found below error in the spool.

I Didn't see anything wrong between segments. Please help me is there any problem in the below code.

DBD NAME=CUSTDBD,ACCESS=HDAM,RMNAME=(DFSHDC40,8,25000)
DATASET DD1=CUSTDD,DEVICE=3390
SEGM NAME=CUSTSEG,BYTES=15,PARENT=0
FIELD NAME=(CUSTNO,SEQ,U),START=1,BYTES=5,TYPE=C
FIELD NAME=CUSTNAME,START=6,BYTES=10,TYPE=C
SEGM NAME=SALSEG,PARENT=CUSTSEG,BYTES=7
FIELD NAME=SALGRADE,START=1,BYTES=2,TYPE=C
FIELD NAME=SALARY,START=3,BYTES=5,TYPE=C
SEGM NAME=ADDRSEG,PARENT=CUSTSEG,BYTES=26
FIELD NAME=ADDR1,START=1,BYTES=10,TYPE=C
FIELD NAME=ADDR2,START=11,BYTES=10,TYPE=C
FIELD NAME=PINCODE,START=21,BYTES=6,TYPE=C
SEGM NAME=EDUSEG,PARENT=ADDRSEG,BYTES=12
FIELD NAME=EDUQUAL,START=1,BYTES=5,TYPE=C
FIELD NAME=EDUCOLL,START=6,BYTES=7,TYPE=C
SEGM NAME=EMDSEG,PARENT=SALSEG,BYTES=20
8,SEGM320 - HIERARCHY SEQUENCE ERROR.
FIELD NAME=CUREMP,START=1,BYTES=10,TYPE=C
FIELD NAME=PRVEMP,START=11,BYTES=10,TYPE=C
DBDGEN
8,DGEN110 - DBDGEN TERMINATED; ERRORS IN DBD.
FINISH
END

Thanks in advance.

Re: Error Hierarchy sequence error while creating DBD.

PostPosted: Mon Apr 26, 2010 9:52 am
by dick scherrer
Hello and welcome to the forum,

I don't "do" ims, but you might try moving the EMDSEG definition immediately after the SALSEG definition.

Re: Error Hierarchy sequence error while creating DBD.

PostPosted: Thu Oct 14, 2010 11:45 pm
by dhs
dbd segments must be in heirarchical order