Hi,
I'm not very good in Transaction controlling.
I have a temp-table with 1.2 millions records that I need to add to a database.
I have a -L parameter set quite high 150,000.
This is in progress 10.1 in unix box.
This is the piece of code:
FOR EACH TT-ob_rate
WHERE TT-ob_rate.fri = YES
BREAK BY TT-ob_rate.dest-area
BY TT-ob_rate.orig-loc
BY TT-ob_rate.mode
BY TT-ob_rate.unit-type
BY TT-ob_rate.width
BY TT-ob_rate.length
BY TT-ob_rate.del-carrier
BY TT-ob_rate.hdr-flag DESCENDING:
IF FIRST-OF(TT-ob_rate.del-carrier) THEN DO:
CREATE fri_hdr.
{gen/x/ourrecid.i fri_hdr} /* assign a random unique number to ourrecid */
ASSIGN fri_hdr.dest-area = TT-ob_rate.dest-area
fri_hdr.orig-loc = TT-ob_rate.orig-loc
fri_hdr.mode = TT-ob_rate.mode
fri_hdr.unit-type = TT-ob_rate.unit-type
fri_hdr.width = TT-ob_rate.width
fri_hdr.length = TT-ob_rate.length
fri_hdr.rnd-rate = TT-ob_rate.rnd-rate
fri_hdr.NA-flag = TT-ob_rate.NA-flg
fri_hdr.currency = TT-ob_rate.currency
fri_hdr.del-carrier = TT-ob_rate.del-carrier
fri_hdr.route-option = TT-ob_rate.route-option
fri_hdr.distance = TT-ob_rate.distance
fri_hdr.onbord = TT-ob_rate.onbord.
END.
CREATE fri_dtl.
ASSIGN fri_dtl.ourrecid = fri_hdr.ourrecid
fri_dtl.thick = TT-ob_rate.thick
fri_dtl.act-thick = TT-ob_rate.act-thick
fri_dtl.rnd-rate = TT-ob_rate.rnd-rate
fri_dtl.NA-flag = TT-ob_rate.NA-flg
fri_dtl.onbord = TT-ob_rate.onbord.
IF TT-ob_rate.Onbord = NO THEN
DELETE TT-ob_rate.
END.
How can I modify this to overcome the lock table overflow.
Any hep will be much appreciated.
I'm not very good in Transaction controlling.
I have a temp-table with 1.2 millions records that I need to add to a database.
I have a -L parameter set quite high 150,000.
This is in progress 10.1 in unix box.
This is the piece of code:
FOR EACH TT-ob_rate
WHERE TT-ob_rate.fri = YES
BREAK BY TT-ob_rate.dest-area
BY TT-ob_rate.orig-loc
BY TT-ob_rate.mode
BY TT-ob_rate.unit-type
BY TT-ob_rate.width
BY TT-ob_rate.length
BY TT-ob_rate.del-carrier
BY TT-ob_rate.hdr-flag DESCENDING:
IF FIRST-OF(TT-ob_rate.del-carrier) THEN DO:
CREATE fri_hdr.
{gen/x/ourrecid.i fri_hdr} /* assign a random unique number to ourrecid */
ASSIGN fri_hdr.dest-area = TT-ob_rate.dest-area
fri_hdr.orig-loc = TT-ob_rate.orig-loc
fri_hdr.mode = TT-ob_rate.mode
fri_hdr.unit-type = TT-ob_rate.unit-type
fri_hdr.width = TT-ob_rate.width
fri_hdr.length = TT-ob_rate.length
fri_hdr.rnd-rate = TT-ob_rate.rnd-rate
fri_hdr.NA-flag = TT-ob_rate.NA-flg
fri_hdr.currency = TT-ob_rate.currency
fri_hdr.del-carrier = TT-ob_rate.del-carrier
fri_hdr.route-option = TT-ob_rate.route-option
fri_hdr.distance = TT-ob_rate.distance
fri_hdr.onbord = TT-ob_rate.onbord.
END.
CREATE fri_dtl.
ASSIGN fri_dtl.ourrecid = fri_hdr.ourrecid
fri_dtl.thick = TT-ob_rate.thick
fri_dtl.act-thick = TT-ob_rate.act-thick
fri_dtl.rnd-rate = TT-ob_rate.rnd-rate
fri_dtl.NA-flag = TT-ob_rate.NA-flg
fri_dtl.onbord = TT-ob_rate.onbord.
IF TT-ob_rate.Onbord = NO THEN
DELETE TT-ob_rate.
END.
How can I modify this to overcome the lock table overflow.
Any hep will be much appreciated.