zOs/TX/PER15DDL

------------$-[right(userid() sysvar(sysnode) date(s) time(), 60, '-')$]
-- testCase $dsn
-- env      $env      phase $phase
-- subsys   $subsys     db $db       creator $creator
------------------------------------------------------------------------
---||| begin ddl testcase $mbr env $env phase $phase
SET CURRENT SQLID='S100447';
$@/wsh/
if $phase <= 1 then $@=[
drop tablespace $db.aper15;
commit;
$]
if $phase = 1 then $@=[
------------------------------------------------------------------------
CREATE TABLESPACE aper15
    IN $db
    USING STOGROUP GSMS
    PRIQTY -1 SECQTY -1
    ERASE  NO
    FREEPAGE 0 PCTFREE 10
    GBPCACHE CHANGED
    TRACKMOD YES
    segsize 64
    BUFFERPOOL BP2
    LOCKSIZE ANY
    LOCKMAX SYSTEM
    CLOSE YES
    COMPRESS YES
    CCSID      EBCDIC
    DEFINE YES
    MAXROWS 255
;  ---------------------------------------------------------------------
  CREATE TABLE $creator.tper15
     ( ix int generated always as identity
     , tst timestamp    not null with default
     , txt varchar($txtL) not null with default
     )
     IN $db.aper15
     AUDIT NONE
     DATA CAPTURE NONE
     CCSID      EBCDIC
     NOT VOLATILE ;
$]
if $phase = 2 then $@=[
  alter  TABLE $creator.tper15
      add rowCha not null generated by default
           FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP
  ;
  commit
  ;
$]
if $phase >= 1 then $@=[
$@do cx=1  to 10 $@=[
    insert into $creator.tper15 (txt)
        select left(strip(tbCreator) || '.'
                 || strip(tbName   ) || '.'
                 || strip(name     ) || '|', $txtL)
            from sysibm.syscolumns
            fetch first 10 rows only
    ;
  commit
  ;
$]
$]
$/wsh/