Friday, 5 August 2011

SQL to quickly create a full package on server (>8.12) only spec files, not DLLs

This is all of the SQL you’ll need to create PD900FA from a (very) fresh copy of central objects.  I’ve needed to do this when installing a new machine and the tables did not exist.  I don’t recommend this for running production sites on, use proper package build and deploy. This might however, get you out of a bind.

--  Generate SQL
--  Version:                       V7R1M0 100423
--  Generated on:                  05/08/11 13:22:15
--  Relational Database:           SVR703
--  Standards Option:              DB2 for i
 
CREATE TABLE COPD900.F98306PD900FA (
    PTOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    PTPOTP GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    PTITNUM DECIMAL(5, 0) DEFAULT NULL ,
    PTSQNUM DECIMAL(5, 0) DEFAULT NULL ,
    PTLNGP GRAPHIC(2) CCSID 13488 DEFAULT NULL ,
    PTCRTU GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    PTUPMJ NUMERIC(6, 0) DEFAULT NULL ,
    PTTDAY DECIMAL(6, 0) DEFAULT NULL ,
    PTPOTX DBCLOB(30000) CCSID 13488 DEFAULT NULL ,
    PTPGTX VARGRAPHIC(255) CCSID 13488 DEFAULT NULL ,
    PTGKEY GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    PTHELPID1 DECIMAL(31, 0) DEFAULT NULL ,
    PTHFNAME GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98306PD900FA_PK PRIMARY KEY( PTOBNM , PTPOTP , PTITNUM , PTSQNUM , PTLNGP ) )  
    ;
 
CREATE TABLE COPD900.F98710PD900FA (
    THTBID DECIMAL(31, 0) DEFAULT NULL ,
    THOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    THNCOL NUMERIC(4, 0) DEFAULT NULL ,
    THNPIN NUMERIC(4, 0) DEFAULT NULL ,
    THNFIN NUMERIC(4, 0) DEFAULT NULL ,
    THJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    THMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    THMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    THFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    THFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98710PD900FA_PK PRIMARY KEY( THOBNM ) )  
    ;
 
CREATE TABLE COPD900.F98711PD900FA (
    TDTBID DECIMAL(31, 0) DEFAULT NULL ,
    TDOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    TDDDID DECIMAL(31, 0) DEFAULT NULL ,
    TDOBND GRAPHIC(11) CCSID 13488 DEFAULT NULL ,
    TDPSEQ DECIMAL(5, 0) DEFAULT NULL ,
    TDSQLC GRAPHIC(30) CCSID 13488 DEFAULT NULL ,
    TDCID DECIMAL(11, 0) DEFAULT NULL ,
    TDJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    TDMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TDMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TDFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TDFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98711PD900FA_PK PRIMARY KEY( TDOBNM , TDOBND ) )  
    ;
 
CREATE TABLE COPD900.F98712PD900FA (
    TPTBID DECIMAL(31, 0) DEFAULT NULL ,
    TPOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    TPINID DECIMAL(31, 0) DEFAULT NULL ,
    TPDESC GRAPHIC(30) CCSID 13488 DEFAULT NULL ,
    TPPRMF GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TPUNIQ GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TPNDET NUMERIC(4, 0) DEFAULT NULL ,
    TPJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    TPMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TPMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TPFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TPFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98712PD900FA_PK PRIMARY KEY( TPOBNM , TPINID ) )  
    ;
 
CREATE TABLE COPD900.F98713PD900FA (
    TLTBID DECIMAL(31, 0) DEFAULT NULL ,
    TLOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    TLINID DECIMAL(31, 0) DEFAULT NULL ,
    TLDESC GRAPHIC(30) CCSID 13488 DEFAULT NULL ,
    TLDDID DECIMAL(31, 0) DEFAULT NULL ,
    TLOBND GRAPHIC(11) CCSID 13488 DEFAULT NULL ,
    TLCMPI NUMERIC(4, 0) DEFAULT NULL ,
    TLSRTO GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TLCFLD NUMERIC(4, 0) DEFAULT NULL ,
    TLJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    TLMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TLMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TLFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    TLFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98713PD900FA_PK PRIMARY KEY( TLOBNM , TLOBND , TLINID ) )  
    ;
 
CREATE TABLE COPD900.F98720PD900FA (
    BVOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    BVBVID DECIMAL(31, 0) DEFAULT NULL ,
    BVBVBLOB BLOB(15728632) DEFAULT NULL ,
    BVJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    BVMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    BVMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    BVFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    BVFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98720PD900FA_PK PRIMARY KEY( BVOBNM ) )  
    ;
 
CREATE TABLE COPD900.F98740PD900FA (
    ELOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    ELEVSPEC DECIMAL(31, 0) DEFAULT NULL ,
    ELPRDTYP DECIMAL(31, 0) DEFAULT NULL ,
    ELAPPLID DECIMAL(31, 0) DEFAULT NULL ,
    ELFORMID DECIMAL(31, 0) DEFAULT NULL ,
    ELCTRLID DECIMAL(31, 0) DEFAULT NULL ,
    ELWEVENT DECIMAL(15, 0) DEFAULT NULL ,
    ELERID3 DECIMAL(31, 0) DEFAULT NULL ,
    ELERBLOB BLOB(15728632) DEFAULT NULL ,
    ELJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    ELMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ELMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ELFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ELFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ELVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    ELFMNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    ELEVSK GRAPHIC(36) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98740PD900FA_PK PRIMARY KEY( ELPRDTYP , ELOBNM , ELVERS , ELFMNM , ELCTRLID , ELWEVENT , ELERID3 ) )  
    ;
 
CREATE TABLE COPD900.F98741PD900FA (
    ESEVSPEC DECIMAL(31, 0) DEFAULT NULL ,
    ESEVSEQ DECIMAL(31, 0) DEFAULT NULL ,
    ESERBLOB BLOB(15728632) DEFAULT NULL ,
    ESJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    ESMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ESMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ESFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ESFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ESEVSK GRAPHIC(36) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98741PD900FA_PK PRIMARY KEY( ESEVSK , ESEVSEQ ) )  
    ;
 
CREATE TABLE COPD900.F98743PD900FA (
    DTOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    DTTMPLTYP NUMERIC(2, 0) DEFAULT NULL ,
    DTTMPLID DECIMAL(31, 0) DEFAULT NULL ,
    DTTMPLNM GRAPHIC(15) CCSID 13488 DEFAULT NULL ,
    DTERBLOB BLOB(15728632) DEFAULT NULL ,
    DTJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    DTMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    DTMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    DTFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    DTFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98743PD900FA_PK PRIMARY KEY( DTOBNM ) )  
    ;
 
CREATE TABLE COPD900.F98745PD900FA (
    SFOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    SFNMNAME GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    SFDESC GRAPHIC(30) CCSID 13488 DEFAULT NULL ,
    SFERBLOB BLOB(15728632) DEFAULT NULL ,
    SFJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    SFMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    SFMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    SFFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    SFFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98745PD900FA_PK PRIMARY KEY( SFOBNM , SFNMNAME ) )  
    ;
 
CREATE TABLE COPD900.F98750PD900FA (
    FTOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    FTAPPLID DECIMAL(31, 0) DEFAULT NULL ,
    FTTEXTID DECIMAL(31, 0) DEFAULT NULL ,
    FTLNGP GRAPHIC(2) CCSID 13488 DEFAULT NULL ,
    FTSY GRAPHIC(4) CCSID 13488 DEFAULT NULL ,
    FTFDABLOB BLOB(15728632) DEFAULT NULL ,
    FTJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    FTMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    FTMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    FTFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    FTFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98750PD900FA_PK PRIMARY KEY( FTOBNM , FTTEXTID , FTLNGP , FTSY ) )  
    ;
 
CREATE TABLE COPD900.F98751PD900FA (
    FSOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    FSCTRLID DECIMAL(31, 0) DEFAULT NULL ,
    FSAPPLID DECIMAL(31, 0) DEFAULT NULL ,
    FSRCRDTP NUMERIC(2, 0) DEFAULT NULL ,
    FSGNCID1 DECIMAL(31, 0) DEFAULT NULL ,
    FSGNCID2 DECIMAL(31, 0) DEFAULT NULL ,
    FSWEVENT DECIMAL(15, 0) DEFAULT NULL ,
    FSGNCID3 DECIMAL(31, 0) DEFAULT NULL ,
    FSFDABLOB BLOB(15728632) DEFAULT NULL ,
    FSJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    FSMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    FSMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    FSFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    FSFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    FSFMNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98751PD900FA_PK PRIMARY KEY( FSOBNM , FSRCRDTP , FSFMNM , FSGNCID2 , FSWEVENT , FSGNCID3 ) )  
    ;
 
CREATE TABLE COPD900.F98752PD900FA (
    AHOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    AHAPPLID DECIMAL(31, 0) DEFAULT NULL ,
    AHFDABLOB BLOB(15728632) DEFAULT NULL ,
    AHJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    AHMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    AHMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    AHFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    AHFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98752PD900FA_PK PRIMARY KEY( AHOBNM ) )  
    ;
 
CREATE TABLE COPD900.F98753PD900FA (
    ADOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    ADAPPLID DECIMAL(31, 0) DEFAULT NULL ,
    ADFMNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    ADFRMID DECIMAL(31, 0) DEFAULT NULL ,
    ADFDABLOB BLOB(15728632) DEFAULT NULL ,
    ADJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    ADMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ADMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ADFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    ADFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98753PD900FA_PK PRIMARY KEY( ADOBNM , ADFMNM ) )  
    ;
 
CREATE TABLE COPD900.F98760PD900FA (
    RTOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    RTREPORTID DECIMAL(31, 0) DEFAULT NULL ,
    RTTEXTID DECIMAL(31, 0) DEFAULT NULL ,
    RTLNGP GRAPHIC(2) CCSID 13488 DEFAULT NULL ,
    RTSY GRAPHIC(4) CCSID 13488 DEFAULT NULL ,
    RTRDABLOB BLOB(15728632) DEFAULT NULL ,
    RTJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    RTMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    RTMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    RTFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    RTFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    RTVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98760PD900FA_PK PRIMARY KEY( RTOBNM , RTVERS , RTTEXTID , RTLNGP , RTSY ) )  
    ;
 
CREATE TABLE COPD900.F98761PD900FA (
    RSOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    RSCTRLID DECIMAL(31, 0) DEFAULT NULL ,
    RSREPORTID DECIMAL(31, 0) DEFAULT NULL ,
    RSRCRDTP NUMERIC(2, 0) DEFAULT NULL ,
    RSGNCID1 DECIMAL(31, 0) DEFAULT NULL ,
    RSGNCID2 DECIMAL(31, 0) DEFAULT NULL ,
    RSWEVENT DECIMAL(15, 0) DEFAULT NULL ,
    RSGNCID3 DECIMAL(31, 0) DEFAULT NULL ,
    RSRDABLOB BLOB(15728632) DEFAULT NULL ,
    RSJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    RSMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    RSMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    RSFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    RSFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    RSFMNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    RSVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98761PD900FA_PK PRIMARY KEY( RSOBNM , RSVERS , RSRCRDTP , RSGNCID1 , RSGNCID2 , RSWEVENT , RSGNCID3 ) )  
    ;
 
CREATE TABLE COPD900.F98762PD900FA (
    BCOBNM GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    BCBHVRID DECIMAL(31, 0) DEFAULT NULL ,
    BCSRCFNM GRAPHIC(80) CCSID 13488 DEFAULT NULL ,
    BCRDABLOB BLOB(15728632) DEFAULT NULL ,
    BCJDEVERS GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    BCMRGMOD GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    BCMRGOPT GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    BCFFU1 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    BCFFU2 GRAPHIC(1) CCSID 13488 DEFAULT NULL ,
    BCFNNM GRAPHIC(32) CCSID 13488 DEFAULT NULL ,
    CONSTRAINT COPD900.F98762PD900FA_PK PRIMARY KEY( BCFNNM ) )  
    ;
 
CREATE TABLE COPD900.F98770PD900FA (
    SMFMAT GRAPHIC(10) CCSID 13488 DEFAULT NULL ,
    SMERBLOB BLOB(15728632) DEFAULT NULL ,
    CONSTRAINT COPD900.F98770PD900FA_PK PRIMARY KEY( SMFMAT ) )  
    ;


--  Generate SQL
--  Version:                       V7R1M0 100423
--  Generated on:                  05/08/11 13:27:49
--  Relational Database:           SVR703
--  Standards Option:              DB2 for i
 
CREATE UNIQUE INDEX COPD900.F98306PD900FA_1
    ON COPD900.F98306PD900FA ( PTOBNM ASC , PTPOTP ASC , PTITNUM ASC , PTSQNUM ASC , PTLNGP ASC ) ;
 
CREATE INDEX COPD900.F98306PD900FA_2
    ON COPD900.F98306PD900FA ( PTOBNM ASC , PTLNGP ASC ) ;
 
CREATE INDEX COPD900.F98710PD900FA_1
    ON COPD900.F98710PD900FA ( THTBID ASC , THOBNM ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98710PD900FA_2
    ON COPD900.F98710PD900FA ( THOBNM ASC ) ;
 
CREATE INDEX COPD900.F98711PD900FA_1
    ON COPD900.F98711PD900FA ( TDTBID ASC , TDDDID ASC , TDOBNM ASC , TDOBND ASC ) ;
 
CREATE INDEX COPD900.F98711PD900FA_2
    ON COPD900.F98711PD900FA ( TDDDID ASC ) ;
 
CREATE INDEX COPD900.F98711PD900FA_4
    ON COPD900.F98711PD900FA ( TDOBNM ASC , TDDDID ASC , TDOBND ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98711PD900FA_5
    ON COPD900.F98711PD900FA ( TDOBNM ASC , TDOBND ASC ) ;
 
CREATE INDEX COPD900.F98711PD900FA_6
    ON COPD900.F98711PD900FA ( TDOBND ASC ) ;
 
CREATE INDEX COPD900.F98711PD900FA_7
    ON COPD900.F98711PD900FA ( TDOBNM ASC , TDPSEQ ASC ) ;
 
CREATE INDEX COPD900.F98712PD900FA_1
    ON COPD900.F98712PD900FA ( TPTBID ASC , TPINID ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98712PD900FA_2
    ON COPD900.F98712PD900FA ( TPOBNM ASC , TPINID ASC ) ;
 
CREATE INDEX COPD900.F98713PD900FA_1
    ON COPD900.F98713PD900FA ( TLTBID ASC , TLDDID ASC , TLINID ASC ) ;
 
CREATE INDEX COPD900.F98713PD900FA_2
    ON COPD900.F98713PD900FA ( TLDDID ASC , TLCMPI ASC , TLINID ASC , TLTBID ASC ) ;
 
CREATE INDEX COPD900.F98713PD900FA_3
    ON COPD900.F98713PD900FA ( TLTBID ASC , TLINID ASC , TLCMPI ASC ) ;
 
CREATE INDEX COPD900.F98713PD900FA_4
    ON COPD900.F98713PD900FA ( TLOBNM ASC , TLDDID ASC , TLINID ASC ) ;
 
CREATE INDEX COPD900.F98713PD900FA_5
    ON COPD900.F98713PD900FA ( TLDDID ASC , TLCMPI ASC , TLINID ASC , TLOBNM ASC ) ;
 
CREATE INDEX COPD900.F98713PD900FA_6
    ON COPD900.F98713PD900FA ( TLOBNM ASC , TLINID ASC , TLCMPI ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98713PD900FA_7
    ON COPD900.F98713PD900FA ( TLOBNM ASC , TLOBND ASC , TLINID ASC ) ;
 
CREATE INDEX COPD900.F98720PD900FA_1
    ON COPD900.F98720PD900FA ( BVBVID ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98720PD900FA_2
    ON COPD900.F98720PD900FA ( BVOBNM ASC ) ;
 
CREATE INDEX COPD900.F98740PD900FA_1
    ON COPD900.F98740PD900FA ( ELPRDTYP ASC , ELAPPLID ASC , ELFORMID ASC , ELCTRLID ASC , ELWEVENT ASC , ELERID3 ASC ) ;
 
CREATE INDEX COPD900.F98740PD900FA_2
    ON COPD900.F98740PD900FA ( ELOBNM ASC , ELPRDTYP ASC , ELFORMID ASC , ELCTRLID ASC , ELWEVENT ASC , ELERID3 ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98740PD900FA_3
    ON COPD900.F98740PD900FA ( ELPRDTYP ASC , ELOBNM ASC , ELVERS ASC , ELFMNM ASC , ELCTRLID ASC , ELWEVENT ASC , ELERID3 ASC ) ;
 
CREATE INDEX COPD900.F98740PD900FA_4
    ON COPD900.F98740PD900FA ( ELPRDTYP ASC , ELOBNM ASC , ELFMNM ASC , ELCTRLID ASC , ELWEVENT ASC , ELERID3 ASC ) ;
 
CREATE INDEX COPD900.F98741PD900FA_1
    ON COPD900.F98741PD900FA ( ESEVSPEC ASC , ESEVSEQ ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98741PD900FA_2
    ON COPD900.F98741PD900FA ( ESEVSK ASC , ESEVSEQ ASC ) ;
 
CREATE INDEX COPD900.F98743PD900FA_1
    ON COPD900.F98743PD900FA ( DTTMPLID ASC , DTTMPLNM ASC ) ;
 
CREATE INDEX COPD900.F98743PD900FA_2
    ON COPD900.F98743PD900FA ( DTOBNM ASC , DTTMPLTYP ASC , DTTMPLID ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98743PD900FA_3
    ON COPD900.F98743PD900FA ( DTOBNM ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98745PD900FA_1
    ON COPD900.F98745PD900FA ( SFOBNM ASC , SFNMNAME ASC ) ;
 
CREATE INDEX COPD900.F98750PD900FA_1
    ON COPD900.F98750PD900FA ( FTAPPLID ASC , FTTEXTID ASC , FTLNGP ASC , FTSY ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98750PD900FA_2
    ON COPD900.F98750PD900FA ( FTOBNM ASC , FTTEXTID ASC , FTLNGP ASC , FTSY ASC ) ;
 
CREATE INDEX COPD900.F98751PD900FA_1
    ON COPD900.F98751PD900FA ( FSAPPLID ASC , FSRCRDTP ASC , FSGNCID1 ASC , FSGNCID2 ASC , FSWEVENT ASC , FSGNCID3 ASC ) ;
 
CREATE INDEX COPD900.F98751PD900FA_2
    ON COPD900.F98751PD900FA ( FSOBNM ASC , FSRCRDTP ASC , FSGNCID1 ASC , FSGNCID2 ASC , FSWEVENT ASC , FSGNCID3 ASC ) ;
 
CREATE INDEX COPD900.F98751PD900FA_3
    ON COPD900.F98751PD900FA ( FSOBNM ASC , FSRCRDTP ASC , FSGNCID1 ASC , FSCTRLID ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98751PD900FA_4
    ON COPD900.F98751PD900FA ( FSOBNM ASC , FSRCRDTP ASC , FSFMNM ASC , FSGNCID2 ASC , FSWEVENT ASC , FSGNCID3 ASC ) ;
 
CREATE INDEX COPD900.F98751PD900FA_5
    ON COPD900.F98751PD900FA ( FSOBNM ASC , FSRCRDTP ASC , FSFMNM ASC , FSCTRLID ASC ) ;
 
CREATE INDEX COPD900.F98751PD900FA_6
    ON COPD900.F98751PD900FA ( FSRCRDTP ASC ) ;
 
CREATE INDEX COPD900.F98752PD900FA_1
    ON COPD900.F98752PD900FA ( AHAPPLID ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98752PD900FA_2
    ON COPD900.F98752PD900FA ( AHOBNM ASC ) ;
 
CREATE INDEX COPD900.F98753PD900FA_1
    ON COPD900.F98753PD900FA ( ADAPPLID ASC , ADFRMID ASC ) ;
 
CREATE INDEX COPD900.F98753PD900FA_2
    ON COPD900.F98753PD900FA ( ADFRMID ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98753PD900FA_3
    ON COPD900.F98753PD900FA ( ADOBNM ASC , ADFMNM ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98753PD900FA_4
    ON COPD900.F98753PD900FA ( ADFMNM ASC ) ;
 
CREATE INDEX COPD900.F98760PD900FA_1
    ON COPD900.F98760PD900FA ( RTREPORTID ASC , RTTEXTID ASC , RTLNGP ASC , RTSY ASC ) ;
 
CREATE INDEX COPD900.F98760PD900FA_2
    ON COPD900.F98760PD900FA ( RTOBNM ASC , RTTEXTID ASC , RTLNGP ASC , RTSY ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98760PD900FA_3
    ON COPD900.F98760PD900FA ( RTOBNM ASC , RTVERS ASC , RTTEXTID ASC , RTLNGP ASC , RTSY ASC ) ;
 
CREATE INDEX COPD900.F98761PD900FA_1
    ON COPD900.F98761PD900FA ( RSREPORTID ASC , RSRCRDTP ASC , RSGNCID1 ASC , RSGNCID2 ASC , RSWEVENT ASC , RSGNCID3 ASC ) ;
 
CREATE INDEX COPD900.F98761PD900FA_2
    ON COPD900.F98761PD900FA ( RSOBNM ASC , RSRCRDTP ASC , RSGNCID1 ASC , RSGNCID2 ASC , RSWEVENT ASC , RSGNCID3 ASC ) ;
 
CREATE INDEX COPD900.F98761PD900FA_3
    ON COPD900.F98761PD900FA ( RSOBNM ASC , RSRCRDTP ASC , RSGNCID1 ASC , RSCTRLID ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98761PD900FA_4
    ON COPD900.F98761PD900FA ( RSOBNM ASC , RSVERS ASC , RSRCRDTP ASC , RSGNCID1 ASC , RSGNCID2 ASC , RSWEVENT ASC , RSGNCID3 ASC ) ;
 
CREATE INDEX COPD900.F98761PD900FA_5
    ON COPD900.F98761PD900FA ( RSOBNM ASC , RSVERS ASC , RSRCRDTP ASC , RSGNCID1 ASC , RSCTRLID ASC ) ;
 
CREATE INDEX COPD900.F98761PD900FA_6
    ON COPD900.F98761PD900FA ( RSRCRDTP ASC ) ;
 
CREATE INDEX COPD900.F98762PD900FA_1
    ON COPD900.F98762PD900FA ( BCBHVRID ASC ) ;
 
CREATE INDEX COPD900.F98762PD900FA_2
    ON COPD900.F98762PD900FA ( BCSRCFNM ASC , BCBHVRID ASC ) ;
 
CREATE INDEX COPD900.F98762PD900FA_3
    ON COPD900.F98762PD900FA ( BCOBNM ASC , BCBHVRID ASC ) ;
 
CREATE INDEX COPD900.F98762PD900FA_4
    ON COPD900.F98762PD900FA ( BCOBNM ASC , BCSRCFNM ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98762PD900FA_5
    ON COPD900.F98762PD900FA ( BCFNNM ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98762PD900FA_6
    ON COPD900.F98762PD900FA ( BCSRCFNM ASC , BCFNNM ASC ) ;
 
CREATE UNIQUE INDEX COPD900.F98762PD900FA_7
    ON COPD900.F98762PD900FA ( BCOBNM ASC , BCFNNM ASC ) ;

/*Use the below statement to generate the INSERT INTO SELECT * FROM statements*/

select 'INSERT INTO COPD900.' || table_name || 'PD900FA SELECT * FROM COPD900.' || table_name || ';' from qsys2.systables where table_schema = 'COPD900' and length(table_name) < 7 ;

INSERT INTO COPD900.F98306PD900FA SELECT * FROM COPD900.F98306;   
INSERT INTO COPD900.F98710PD900FA SELECT * FROM COPD900.F98710;   
INSERT INTO COPD900.F98711PD900FA SELECT * FROM COPD900.F98711;   
INSERT INTO COPD900.F98712PD900FA SELECT * FROM COPD900.F98712;   
INSERT INTO COPD900.F98713PD900FA SELECT * FROM COPD900.F98713;   
INSERT INTO COPD900.F98720PD900FA SELECT * FROM COPD900.F98720;   
INSERT INTO COPD900.F98740PD900FA SELECT * FROM COPD900.F98740;   
INSERT INTO COPD900.F98741PD900FA SELECT * FROM COPD900.F98741;   
INSERT INTO COPD900.F98743PD900FA SELECT * FROM COPD900.F98743;   
INSERT INTO COPD900.F98745PD900FA SELECT * FROM COPD900.F98745;   
INSERT INTO COPD900.F98750PD900FA SELECT * FROM COPD900.F98750;   
INSERT INTO COPD900.F98751PD900FA SELECT * FROM COPD900.F98751;   
INSERT INTO COPD900.F98752PD900FA SELECT * FROM COPD900.F98752;   
INSERT INTO COPD900.F98753PD900FA SELECT * FROM COPD900.F98753;   
INSERT INTO COPD900.F98760PD900FA SELECT * FROM COPD900.F98760;   
INSERT INTO COPD900.F98761PD900FA SELECT * FROM COPD900.F98761;   
INSERT INTO COPD900.F98762PD900FA SELECT * FROM COPD900.F98762;   

No comments:

Extending JDE to generative AI