× 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.



I had a similar problem when I added some records to the file using CPYF with the ADDUPD option, after that the insert tryed to use the same numbers already added with CPYF.

Smith, Dave wrote:

Charles:

Works fine for me.  Tested on V5R3

I tried the following per your statements.  (Added the constraint as a
secondary step but that should not matter.

CREATE TABLE MyLIB.HPDOCU (   DHDOID INTEGER GENERATED ALWAYS AS
IDENTITY (   START WITH 1 INCREMENT BY 1   NO MINVALUE NO MAXVALUE   NO
CYCLE NO ORDER   CACHE 20 ),   DHCSCD CHAR(3) CCSID 37 NOT NULL DEFAULT
'' ,   DHBRCH CHAR(13) CCSID 37 NOT NULL DEFAULT '' );
alter table MyLIB.HPDOCU add CONSTRAINT MyLIB.QSYS_HRDOCU_00001 PRIMARY
KEY( DHDOID )  ;

insert into MyLIB.hpdocu (DHCSCD, DHBRCH) values('AAA', 'TestAAA');
insert into MyLIB.hpdocu (DHCSCD, DHBRCH) values('BBB', 'TestBBB');
insert into MyLIB.hpdocu (DHCSCD, DHBRCH) values('CCC', 'TestCCC');

Select * from MyLIB.hpdocu:

1       AAA     TestAAA         
2       BBB     TestBBB         
3 CCC TestCCC
David Smith




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.