zOs/TX/WK993DDL
set current sqlid = 'S100447';
drop TABLESPACE $db.a993C;
drop TABLESPACE $db.a993P;
commit;
$@[
if $phase >= 1 then $@=[
CREATE TABLESPACE a993C
IN $db
USING STOGROUP GSMS
PRIQTY -1 SECQTY -1
FREEPAGE 10 PCTFREE 5
GBPCACHE CHANGED
TRACKMOD YES
LOGGED
BUFFERPOOL BP2
SEGSIZE 64
LOCKSIZE ANY
LOCKMAX SYSTEM
CLOSE YES
COMPRESS YES
CCSID EBCDIC
DEFINE YES
MAXROWS 255;
CREATE TABLESPACE a993P
IN $db
USING STOGROUP GSMS
PRIQTY -1 SECQTY -1
FREEPAGE 10 PCTFREE 5
GBPCACHE CHANGED
TRACKMOD YES
LOGGED
BUFFERPOOL BP2
SEGSIZE 64
LOCKSIZE ANY
LOCKMAX SYSTEM
CLOSE YES
COMPRESS YES
CCSID EBCDIC
DEFINE YES
MAXROWS 255;
CREATE TABLE $creator.TWK993Par
(parId int not null with default
,name varchar(30) not null with default
,primary key(parId)
)
IN $db.a993P
AUDIT NONE
DATA CAPTURE NONE
CCSID EBCDIC
NOT VOLATILE
APPEND NO ;
CREATE unique INDEX $creator.IWK993Par
ON $creator.TWK993Par
(parId)
USING STOGROUP GSMS
PRIQTY -1 SECQTY -1
ERASE NO
FREEPAGE 5 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
COMPRESS NO
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFER NO
DEFINE YES;
CREATE TABLE $creator.TWK993Chi
(parId int not null with default
,name varchar(30) not null with default
)
IN $db.a993C
AUDIT NONE
DATA CAPTURE NONE
CCSID EBCDIC
NOT VOLATILE
APPEND NO ;
CREATE INDEX $creator.IWK993Chi
ON $creator.TWK993Chi
(parId)
USING STOGROUP GSMS
PRIQTY -1 SECQTY -1
ERASE NO
FREEPAGE 5 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
COMPRESS NO
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFER NO
DEFINE YES;
ALTER TABLE $creator.TWK993Chi FOREIGN KEY TWK993Chi (parId)
REFERENCES $creator.TWK993Par(parId)
ON DELETE RESTRICT ENFORCED ;
insert into $creator.TWK993Par values (1, 'walter') ;
insert into $creator.TWK993Chi values (1, 'gregor') ;
insert into $creator.TWK993Chi values (1, 'david') ;
insert into $creator.TWK993Chi values (1, 'florian') ;
insert into $creator.TWK993Par values (2, 'eveline') ;
insert into $creator.TWK993Chi values (2, 'stefan') ;
insert into $creator.TWK993Chi values (2, 'jerome') ;
commit;
$]
$]