× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 10/14/2016
02:03:54 PM:
I wonder if perhaps the error is diagnosed for a CONSTRAINT, PRIMARY
or UNIQUE rather than an INDEX or unique keyed Logical File?

Yes, it is a UNIQUE CONSTRAINT that is being diagnosed.

--------------------------------------------------------------------------------------------------
-- Create Table and Columns
--------------------------------------------------------------------------------------------------
Create Table &Library/IM_LIFO_Detail_Exception_Rel For System Name
IMLFXRLT
(
IMLFXRLT_ID For Column IMLFXRLTID BigInt Generated
Always As Identity
(Start With 1, Increment By 1, No MinValue, No MaxValue, No Cycle,
Order, Cache 20)

,IMLFDTLT_ID For Column IMLFDTLTID BigInt Not Null
--FK to LIFO Detail
,IMLFXCPT_ID For Column IMLFXCPTID BigInt Not Null
--FK to Exception Codes

,Added_By_User For Column AddByUsr VarChar(18) Not Null
Default User
,Added_By_Program For Column AddByPgm VarChar(10)
,Added_Timestamp For Column AddTs Timestamp Not Null
Default Current_Timestamp
,Changed_By_User For Column ChgByUsr VarChar(18) Not Null
Default User
,Changed_By_Program For Column ChgByPgm VarChar(10)
,Changed_Timestamp For Column ChgTs Timestamp Generated
Always
For Each Row On Update As Row Change Timestamp Not Null
)

-- Name the Record Format Used By RPG

RcdFmt IMLFXRLRf ;

--------------------------------------------------------------------------------------------------
-- Add text/description to table
--------------------------------------------------------------------------------------------------

Label On Table IM_LIFO_Detail_Exception_Rel
Is 'IM-LIFO Inventory-Detail Exception Rel';

--------------------------------------------------------------------------------------------------
-- Add Constraints
--------------------------------------------------------------------------------------------------
Alter Table IM_LIFO_Detail_Exception_Rel
Add Constraint IMLFXRLT_PK
Primary Key (IMLFXRLT_ID);

Label On Constraint IMLFXRLT_PK
Is 'IM-LIFO Inventory-Detail Exception Rel-PK';
-------------------------------------------------
Alter Table IM_LIFO_Detail_Exception_Rel
Add Constraint IMLFXRLT_IMLFDTLTID_IMLFXCPTID_UK
Unique (IMLFDTLT_ID,IMLFXCPT_ID );

Label On Constraint IMLFXRLT_IMLFDTLTID_IMLFXCPTID_UK
Is 'IM-LIFO Inventory-Detail Exception Rel-UK';
-------------------------------------------------
Alter Table IM_LIFO_Detail_Exception_Rel
Add Constraint IMLFXRLT_IMLFDTLTID_FK
Foreign Key (IMLFDTLT_ID)
References IMLFDTLT (IMLFDTLTID)
On Delete Cascade
On Update Restrict;

Label On Constraint IMLFXRLT_IMLFDTLTID_FK
Is 'IM-LIFO Inv-Detail Exception Rel-IM02T-FK1';
-------------------------------------------------
Alter Table IM_LIFO_Detail_Exception_Rel
Add Constraint IMLFXRLT_IMLFXCPTID_FK
Foreign Key (IMLFXCPT_ID)
References IMLFXCPT (IMLFXCPTID)
On Delete Restrict
On Update Restrict;

Label On Constraint IMLFXRLT_IMLFXCPTID_FK
Is 'IM-LIFO Inv-Detail Exception Rel-IMLFXRLT-FK2';
--------------------------------------------------------------------------------------------------
-- Column Text Descriptions
--------------------------------------------------------------------------------------------------
Label On Column IM_LIFO_Detail_Exception_Rel
(
IMLFXRLT_ID Is 'PK to IMLFXRLT Item and LIFO
Exception Rel'
,IMLFDTLT_ID Is 'FK to IMLFDTLT LIFO Detail
Information'
,IMLFXCPT_ID Is 'FK to IMLFXCPT LIFO Exception
Reason Codes'

,Added_By_User Is 'IMLFXRLT Added by
User'
,Added_By_Program Is 'IMLFXRLT Added by
Program'
,Added_TimeStamp Is 'IMLFXRLT Added
TimeStamp'
,Changed_By_User Is 'IMLFXRLT Changed by
User'
,Changed_By_Program Is 'IMLFXRLT Changed by
Program'
,Changed_TimeStamp Is 'IMLFXRLT Changed
TimeStamp'
);
--------------------------------------------------------------------------------------------------
-- Field Text Descriptions
--------------------------------------------------------------------------------------------------
Label On Column IM_LIFO_Detail_Exception_Rel
(
IMLFXRLT_ID Text Is 'PK to IMLFXRLT - Item and LIFO
Exception Rel'
,IMLFDTLT_ID Text Is 'FK to IMLFDTLT - LIFO Detail
Information'
,IMLFXCPT_ID Text Is 'FK to IMLFXCPT - LIFO Exception
Reason Codes'

,Added_By_User Text Is 'IMLFXRLT- Added by User'
,Added_By_Program Text Is 'IMLFXRLT- Added by Program'
,Added_TimeStamp Text Is 'IMLFXRLT- Added TimeStamp'
,Changed_By_User Text Is 'IMLFXRLT- Changed by User'
,Changed_By_Program Text Is 'IMLFXRLT- Changed by Program'
,Changed_TimeStamp Text Is 'IMLFXRLT- Changed TimeStamp'
);


Sincerely,

Dave Clark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.