zOs/TX/REC01DDL

------------$-[right(userid() sysvar(sysnode) date(s) time(), 60, '-')$]
-- testCase $dsn
-- env      $env      phase $phase
-- subsys   $dbSys     db $db       creator $creator
------------------------------------------------------------------------
---||| begin ddl testcase $mbr env $env phase $phase
SET CURRENT SQLID='S100447';
drop tablespace $db.Rec01;
drop tablespace $db.aRec01;
commit;
$@ if $phase > 0 then $@=/create/

CREATE TABLESPACE Rec01
    IN $db
    USING STOGROUP GSMS
    PRIQTY -1 SECQTY -1
    ERASE  NO
    GBPCACHE CHANGED
    TRACKMOD YES
    segsize 64
$@ if $phase = 2 then $@=[
    numParts 3
$]
    BUFFERPOOL BP2
    LOCKSIZE ANY
    LOCKMAX SYSTEM
    CLOSE YES
    COMPRESS YES
    CCSID      ebcdic
    DEFINE NO
    MAXROWS 255
;  ---------------------------------------------------------------------
--- set current isolation level = 'UR';
  CREATE TABLE $creator.tqxRec01
     ( pa      smallint not null
     , txt     char(20) not null
     , tst     timestamp not null with default
     )
    IN $db.Rec01
$@ if $phase = 2 then $@=[
    partition by (pa)
      ( part 1 values (1)
      , part 2 values (2)
      , part 3 values (3)
      )
$]
    AUDIT NONE
    DATA CAPTURE NONE
    CCSID      ebcdic
    NOT VOLATILE ;
CREATE unique INDEX $creator.IQXrec01
  ON $creator.tQXrec01
   (pa, txt, tst)
$@ if $phase = 2 then $@=[
   partitioned
$]
  USING STOGROUP GSMS
  PRIQTY -1 SECQTY -1
  ERASE  NO
  FREEPAGE 0 PCTFREE 5
  GBPCACHE CHANGED
  CLUSTER
  BUFFERPOOL BP1
  CLOSE YES
  COPY NO
  DEFER NO
  DEFINE NO ;
commit;
$/create/
$*(
if $phase  = 10 then $@=[
$@do i=1 to 4 $@=[
    $@do j=1 to 3  $@=[
insert into  $creator.trec01
  select 'c1=Abcdefg', 'c2=Ijklmno', current timestamp,
      strip(tbCreator) || '.' || strip(tbName) || '.' || strip(name),
      colType || '(' || strip(char(length)) || ', '
                     || strip(char(scale)) || ') nulls ' || nulls
                     || ' /tran $i loop $j'
      from sysibm.sysColumns
      where tbCreator like 'SYS%'
      order by tbCreator, tbName, name
      fetch first 10 rows only
    ;
        $]
    commit;
    $]

$*)
---||| end   ddl testcase $mbr env $env phase $phase