zOs/TX/T001DDL
SET CURRENT SQLID='S100447';
SET CURRENT SCHEMA='$creator';
drop tablespace $db.T001A;
commit;
$@ if $phase > 0 then $@=/phaseGtr0/
CREATE TABLESPACE T001A
IN $db
USING STOGROUP GSMS
PRIQTY 48 SECQTY 100
ERASE NO
FREEPAGE 0 PCTFREE 10
GBPCACHE CHANGED
TRACKMOD YES
SEGSIZE $-[if($phase = 2, 8, 64)$]
$-[if($phase =41, MAXPARTITIONS 5)$]
BUFFERPOOL BP2
LOCKSIZE ANY
LOCKMAX SYSTEM
CLOSE YES
COMPRESS YES
CCSID EBCDIC
DEFINE YES
MAXROWS 255
;
create TABLE
${creator} $*(
${creator}lllllllllllllllllllllllllllllllllllllllllllllllllllllllllll70
$*)
.tqzT001lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll70
(
ch1 CHAR(20) FOR SBCS DATA not null with default
, ch2 CHAR($-[20 - $phase$])
FOR SBCS DATA not null with default
, ch3 CHAR(10) FOR SBCS DATA not null with default
)
IN $db.T001A
AUDIT NONE
DATA CAPTURE NONE
CCSID EBCDIC
NOT VOLATILE
; $*(
$@[
if $phase = 1 then $@=[
CREATE UNIQUE INDEX $creator.Iwk401A0
$] else $@=[
CREATE UNIQUE INDEX $creator.Iwk401A1
$]
$]
ON $creator.Twk401A
( wk401CH20 ASC
$@ if $phase = 31 then $@=[
, wk401CH5 ASC
$]
)
$@ if $phase = 32 then $@=[
include (wk401Tst )
$]
USING STOGROUP GSMS
PRIQTY 12 SECQTY 12
ERASE NO
FREEPAGE 0 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFINE YES
PIECESIZE 2 G
;
$@ if $phase = 21 then $@=[
CREATE INDEX $creator.Iwk401A2
ON $creator.Twk401A
( wk401CH2 ASC)
USING STOGROUP GSMS
PRIQTY 12 SECQTY 12
ERASE NO
FREEPAGE 0 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFINE YES
PIECESIZE 2 G
;
$]
$@ if $phase = 4 then $@=[
ALTER TABLE $creator.TWK401A
ALTER WK401TST SET DATA TYPE TIMESTAMP(10);
commit;
$]
$@ if $phase >= 3 then $@=[
CREATE view $creator.vWk401A1 as
select * from $creator.twk401A
;
CREATE view $creator.vWk401A2 as
select * from $creator.vWk401A1
;
$]
$@ if $phase = 24 then $@=[
CREATE view $creator.vWk401A24 as
select 'wk401CH20=' || wk401CH20 || ', wk401CH5=' || wk401CH5
|| ' longStringConstant 30 longer 40 longer 50 longer 6
0 longer 70 longer 80 longer 90 longer100 longer110 longer120 longer130
longer140 longer150 longer160 longer170' || ', wk401CH2='||wk401CH2 ll
from $creator.vwk401A2
;
$]
commit
;
insert into $creator.Twk401A
(wk401ch20, wk401ch5, wk401ch2, wk401tst ) values
('erstens', 'e' , '1' , current timestamp );
insert into $creator.Twk401A
(wk401ch20, wk401ch5, wk401ch2, wk401tst ) values
('zweitens', 'zw', '2' , current timestamp - 2 minute);
insert into $creator.Twk401A
(wk401ch20, wk401ch5, wk401ch2, wk401tst ) values
('drittens', 'dre', '3', current timestamp - 3 hours);
insert into $creator.Twk401A
(wk401ch20, wk401ch5, wk401ch2, wk401tst ) values
('viertens', 'vier', '4', current timestamp - 4 days);
insert into $creator.Twk401A
(wk401ch20, wk401ch5, wk401ch2, wk401tst ) values
('fuenftens', 'fuenf', '5' , current timestamp - 5 months );
$*)
commit
;
$/phaseGtr0/