zOs/TX/XML01DDL

------------$-{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.axml01;
drop tablespace $db.axmlx1;
commit;
$]
if $phase = 1 then $@=[
------------------------------------------------------------------------
CREATE TABLESPACE axml01
    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 LOB TABLESPACE axmlx1
    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.txml01
     ( ix int generated always as identity
     , tst timestamp    not null with default
     , desc varchar(80) not null with default
     , xml XML
     )
     IN $db.axml01
     AUDIT NONE
     DATA CAPTURE NONE
     CCSID      EBCDIC
     NOT VOLATILE ;
  $*(
  create auxiliary table txm01AuxXml in $db.axmlx1
       stores $creator.tXml01 column xml
;  $*)
$]
if $phase = 2 then $@=[
  alter  TABLE $creator.txml01
      add rowCha not null generated always
           FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP
  ;
  commit
  ;
$]
$@=[
$@do cx=1  to 0 $@=[
    insert into $creator.txml01 (txt)
        select left(strip(tbCreator) || '.'
                 || strip(tbName   ) || '.'
                 || strip(name     ) || '|', 128)
            from sysibm.syscolumns
            fetch first 10 rows only
    ;
  commit
  ;
$]
$]
$/wsh/