<?xml version="1.0" encoding="UTF-8" ?>
<!--
  ~ Copyright (c) DbVis Software AB. All Rights Reserved.
  -->

<!DOCTYPE DatabaseProfile SYSTEM "dbvis-defs.dtd">

<DatabaseProfile
        desc="Profile for DB2 z/OS"
        minver="9.5"
        extends="generic">

   <!-- =================================================================== -->
   <!-- Definition of the commands -->
   <!-- =================================================================== -->

   <Commands extends="true">

      <Command id="db2zos.getSchemas">
         <SQL>
            <![CDATA[
select distinct schema
from (select creator as "SCHEMA" from sysibm.systables
         union all
      select schema from sysibm.sysdatatypes
         union all
      select schema from sysibm.sysroutines
         union all
      select schema from sysibm.systriggers
         union all
      select creator as "SCHEMA" from sysibm.syssynonyms
         union all
      select creator as "SCHEMA" from sysibm.sysviews
     ) a
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getSchemaNames">
         <SQL>
            <![CDATA[
select distinct schema
from (select creator as "SCHEMA" from sysibm.systables
         union all
      select schema from sysibm.sysdatatypes
         union all
      select schema from sysibm.sysroutines
         union all
      select schema from sysibm.systriggers
         union all
      select creator as "SCHEMA" from sysibm.syssynonyms
         union all
      select creator as "SCHEMA" from sysibm.sysviews
     ) a
            ]]>
         </SQL>
         <!--Must have Filter element here since this command is fetched from code-->
         <Filter index="SCHEMA" label="Name"/>
      </Command>

      <Command id="db2zos.getTables">
         <SQL>
            <![CDATA[
select * 
from   sysibm.systables
where  creator   =  '${owner}' 
  and  name    like '${table}' 
  and  type    like '${type}'
            ]]>
         </SQL>
      </Command>

      <!-- Overridden since we want a lot more then the std one gives -->
      <Command id="db2zos.getColumns">
         <SQL>
            <![CDATA[
select * 
from   sysibm.syscolumns
where  tbcreator = '${owner}'
  and  tbname    = '${table}' 
order by colno
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getViews">
         <SQL>
            <![CDATA[
select distinct
       v.creator,
       v.name,
       v.check
from   sysibm.sysviews  v 
join   sysibm.systables t 
on     v.creator =  t.creator 
  and  v.name    =  t.name
where  t.type    =  '${type}' 
  and  v.creator =  '${owner}' 
  and  v.name  like '${view}'
order by 1, 2, 3
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getViewSource">
         <SQL>
select
<If test="#util.isDatabaseVersionGTE(10)">
       statement
</If>
<Else>
       text
</Else>
from   sysibm.sysviews
where  creator = '${owner}' 
  and  name    = '${view}'
order by seqno
         </SQL>
      </Command>

      <Command id="db2zos.getTriggers">
         <SQL>
            <![CDATA[
select * 
from   sysibm.systriggers 
where  tbowner = '${tbowner}' 
  and  tbname  like '${table}' 
  and  schema like '${triggerSchema}'
order by schema, name, seqno 
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getTriggersAll">
         <SQL>
            <![CDATA[
select * 
from   sysibm.systriggers 
where  tbowner = '${tbowner}' 
  or  schema = '${triggerSchema}'
order by schema, name, seqno 
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getTableTriggerSource">
         <SQL>           
select 
 <If test="#util.isDatabaseVersionLT(10)">
   text                  
 </If>
 <Else>
   CAST(statement as varchar(30000))
 </Else>
from   sysibm.systriggers
where  schema  = '${owner}' 
  and  name    = '${name}'
order by schema, name, seqno
         
         </SQL>
      </Command>
      
      <Command id="db2zos.getTableConstraints">
         <SQL>
         Select * from  SYSIBM.SYSCHECKS c where c.TBOWNER = '${tbowner}' AND c.tbname = '${table}';
         </SQL>
      </Command>
      
      <!-- Getting indexes includes the possibility to add an extra condition. 
           Typically value for this condition is  
              "and UNIQUERULE NOT IN ('P','C', 'G')"
           Which does exclude indexes not explicitly created -->
      <Command id="db2zos.getIndexesTable">
         <SQL>
            <![CDATA[
select * from   sysibm.sysindexes 
  where  TBCREATOR = '${tableCreator}' 
  and  tbname like '${tableName}' ${xtraCond}
            ]]>
         </SQL>
      </Command>
      
     
     <Command id="db2zos.getIndexesAll">
         <SQL>
            <![CDATA[
select * from   sysibm.sysindexes 
  where (TBCREATOR = '${tableCreator}' OR CREATOR = '${indexCreator}' ) ${xtraCond}
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getIndexColumns">
         <SQL>
            <![CDATA[
select * 
from   sysibm.syskeys
where  ixcreator = '${indexCreator}' 
  and  ixname    = '${name}' 
order by ixname, colseq
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getSystemTables">
         <SQL>
            <![CDATA[
select * 
from   sysibm.systables 
where  creator = '${owner}'
order by creator, name
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getPackages">
         <SQL>
            <![CDATA[
select * 
from   sysibm.syspackage
where  creator = '${owner}'
order by collid, name
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getFunctions">
         <SQL>
            <![CDATA[
select *
from   sysibm.sysroutines
where  routinetype = 'F'
and    schema = '${owner}'
order by schema, name
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getFunctionParms">
         <SQL>
            <![CDATA[
select * 
from   sysibm.sysparms
where  schema          = '${owner}' 
  and  name            = '${function}'
  and  specificname    = '${specificname}'
  and  routinetype     = 'F'
  and  rowtype        in (${rowtype}) 
order by specificname, ordinal
            ]]>
         </SQL>
      </Command>


      <Command id="db2zos.getProcedures">
         <SQL>
            <![CDATA[
select * 
from   sysibm.sysroutines
where  routinetype = 'P'
and    schema = '${owner}'
order by schema, name
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getProcedureParms">
         <SQL>
            <![CDATA[
select * 
from   sysibm.sysparms
where  schema          = '${owner}' 
  and  name            = '${procedure}'
  and  specificname    = '${specificname}'
  and  routinetype     = 'P' 
order by specificname, ordinal
            ]]>
         </SQL>
      </Command>
      
      <Command id="db2zos.getSequences">
         <SQL>
            <![CDATA[
select * from sysibm.syssequences where schema = '${owner}' and seqtype = 'S' order by name
            ]]>
         </SQL>
      </Command>
      
      <Command id="db2zos.getSequencePrivileges">
         <SQL>
            <![CDATA[
select * from sysibm.syssequenceauth where name = '${name}' and schema = '${owner}'
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- DBA related commands requiring certain privileges in the database -->
      <!-- ================================================================= -->
      
     <Command id="db2zos.getGrantees">
        <SQL>
      <![CDATA[select * from sysibm.sysuserauth
      where granteetype = '${granteetype}' and grantee like '${grantee}'
      ]]>
        </SQL>
     </Command>
      
     <Command id="db2zos.getRoles">
        <SQL>
      <![CDATA[select * from sysibm.sysroles
      ]]>
        </SQL>
        <Input name="granteetype" value="U"/>
        <Input name="grantee" value="%"/>
     </Command>
      
      <Command id="db2zos.getAuth">
         <SQL>
            <![CDATA[
select * from sysibm.${table} where grantee = '${grantee}'
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getTableSpaces">
         <SQL>
            <![CDATA[
select * 
from   sysibm.systablespace
order by name
            ]]>
         </SQL>
      </Command>
      
     <Command id="db2zos.getTableSpace-columns">
         <SQL>
            <![CDATA[
            select * from sysibm.systablespace
            where  name = '${objectname}'
            ]]>
         </SQL>
      </Command>

     <Command id="db2zos.TableSpace-getcolumnvalue1">
         <SQL>
            <![CDATA[
            select ${columnname}
            from   sysibm.systablespace
            where  NAME='${objectname}'
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.TableSpace-getcolumnvalue2">
         <SQL>
            <![CDATA[
            select ${columnname}
            from   sysibm.systablepart
            where  TSNAME='${objectname}'
            AND   PARTITION=${partitionnumber}
            ]]>
         </SQL>
      </Command>
      
      <Command id="db2zos.getDatabases">
         <SQL>
            <![CDATA[
            select *
            from   sysibm.sysdatabase
            order by name
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getDatabase-columns">
         <SQL>
            <![CDATA[
            select * from sysibm.sysdatabase
            where  name = '${objectname}'
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.Database-getcolumnvalue1">
         <SQL>
            <![CDATA[
            select ${columnname}
            from   sysibm.sysdatabase
            where  NAME='${objectname}'
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.Database-getcolumnvalue2">
         <SQL>
            <![CDATA[
            select distinct ${columnname}
            from   sysibm.sysdatabase
            ]]>
         </SQL>
      </Command>
      
       <Command id="db2zos.getStorageGroups">
         <SQL>
            <![CDATA[
            select *
            from   sysibm.sysstogroup
            order by name
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getStorageGroup-columns">
         <SQL>
            <![CDATA[
            select * from sysibm.sysstogroup
            where  name = '${objectname}'

            ]]>
         </SQL>
      </Command>
      
      <Command id="db2zos.getSynonyms">
         <SQL>
            <![CDATA[
            select *
            from   sysibm.syssynonyms
            where  creator   =  '${owner}' order by name
            ]]>
         </SQL>
      </Command>

      <Command id="db2zos.getSynonymInfo">
         <SQL>
            <![CDATA[
            select *
            from   sysibm.syssynonyms
            where  creator   =  '${owner}'
            AND    name = '${objectname}'
            ]]>
         </SQL>
      </Command>


      

   </Commands>

   <!-- =================================================================== -->
   <!-- Definition of the object actions that are used by the tree and views -->
   <!-- =================================================================== -->

   <ObjectsActionDef extends="false">
      <ActionGroup type="Tables">
         <Action id="db2zos-tables-create-table" label="Create Table"
                 icon="add" reload="true"
                 class="tableCreate"
                 classargs="create"
                 doclink="/doclink/create-table"/>
        <Action id="db2zos-tables-import-table-data"
                 label="Import Table Data"
                 icon="import"
                 reload="true"
                 class="tableDataImport"
                 doclink="/doclink/import-table"/>
      </ActionGroup>

      <ActionGroup type="Table">
      
         <Action id="db2zos-table-rename" label="Rename Table" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Table Name" name="newTable" style="text"/>
            <Command>
               <SQL><![CDATA[rename table "${schema}"."${objectname}" to ${QB}${newTable}${QE}]]></SQL>
            </Command>
            <Confirm>
               Confirm rename of ${schema}.${objectname} to ${newTable}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} renamed to ${newTable}!
            </Result>
         </Action>

         <Action id="db2zos-table-clear" label="Empty Table" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>

            <Command>
               <SQL><![CDATA[delete from "${schema}"."${objectname}"]]></SQL>
            </Command>
            <Confirm>
               Really remove all rows in table ${schema}.${objectname}?
            </Confirm>
            <Result>
               All rows in table ${schema}.${objectname} has been removed!
            </Result>
         </Action>

         <Action id="db2zos-table-drop" label="Drop Table" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Table Hierarchy" name="hierarchy" style="check">
               <Values>hierarchy</Values>
            </Input>
            <Command><SQL><![CDATA[drop table ${hierarchy} "${schema}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been dropped!
            </Result>
         </Action>
         
          <Action id="db2zos-table-comment" label="Comment Table" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
               <Default>${getTables.REMARKS}</Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on table "${schema}"."${objectname}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on ${schema}.${objectname}?
            </Confirm>
         </Action>

         <Action id="db2zos-table-import-table-data" label="Import Table Data" icon="import"
                 class="tableDataImport"
                 doclink="/doclink/import-table"/>
                 
         <Action id="db2zos-table-export" label="Export Table" icon="export"
                 class="tableExport"
                 doclink="/doclink/export-table"/>

         <Separator/>

         <Action id="db2zos-table-create-index" label="Create Index" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Index Schema" name="indexSchema" style="list" editable="false">
               <Default>${schema}</Default>
                <Values>
                   <Command idref="db2zos.getSchemas"/>
               </Values>
            </Input>
            <Input label="Index Name" name="indexname" style="text"/>
            <Input label="Unique" name="unique" style="check">
               <Values>unique</Values>
            </Input>

            <Input label="Columns" style="separator"/>

            <Input name="columns" style="grid">
               <Arg name="output" value='"${columnname}"${_sortorder}'/>
               <Arg name="newline" value=", "/>

               <Input name="columnname" label="Column Name" style="list">
                  <Values column="4">
                     <Command idref="getColumnNamesFor">
                        <Input name="table_catalog" value="${catalog}"/>
                        <Input name="table_schema" value="${schema}"/>
                        <Input name="table_name" value="${objectname}"/>
                     </Command>
                  </Values>
                  <Default>${0}</Default>
               </Input>
               <Input name="sortorder" label="Sort Order" style="radio">
                  <Labels>ASC|DESC|Default</Labels>
                  <Values>ASC|DESC|</Values>
                  <Default>ASC</Default>
               </Input>
               <SetVar name="_sortorder" value='#sortorder.equals("") ? "" : " " + #sortorder'/>
            </Input>

            <SetVar name="_unique" value='#unique.equals("") ? "" : " " + #unique'/>
            <SetVar name="_columns" value='#columns.trim().equals("") ? "" : "(" + #columns + ")"'/>

            <Command>
               <SQL>
                  <![CDATA[create${_unique} index "${indexSchema}".${QB}${indexname}${QE} on "${schema}"."${objectname}" ${_columns}]]>
               </SQL>
            </Command>
            <Confirm>
               <![CDATA[Create index "${indexname}"?]]>
            </Confirm>
            <Result>
               <![CDATA[Index "${indexname}" created!]]>
            </Result>
         </Action>

         <Action id="db2zos-tabletrigger-create" label="Create Trigger" icon="add" reload="true"
                 doclink="/doclink/create-trigger">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Trigger Schema" name="triggerSchema" style="list" editable="false">
               <Default>${schema}</Default>
                <Values>
                   <Command idref="db2zos.getSchemas"/>
               </Values>
            </Input>
            
            <Input label="Trigger" name="triggerName" style="text"/>
            <Input label="Trigger Time" name="triggerTime" style="radio">
               <Values>NO CASCADE BEFORE|AFTER|INSTEAD OF</Values>
               <Default>AFTER</Default>
            </Input>
            <Input label="Trigger Event" name="triggerEvent" style="radio">
               <Values>DELETE|INSERT|UPDATE</Values>
               <Default>INSERT</Default>
            </Input>
            <Input label="Trigger Type" name="triggerType" style="radio">
               <Values>STATEMENT|ROW</Values>
               <Default>STATEMENT</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Source" style="separator"/>
            <Input name="source" style="text-editor">
               <Default><![CDATA[
--
--  Insert your own trigger code here
--
    insert into anotherTable (col1, col2) values(val1, val2)]]>
               </Default>
            </Input>

            <SetVar name="refType" value='#triggerType.equals("STATEMENT") ? " table" : ""'/>
            <SetVar name="_refd" value='#triggerEvent.equals("DELETE") ? "referencing old" + #refType + " as \"OLD_" + #objectname + "\"" : ""'/>
            <SetVar name="_refi" value='#triggerEvent.equals("INSERT") ? "referencing new" + #refType + " as \"NEW_" + #objectname + "\"" : ""'/>
            <SetVar name="_refu" value='#triggerEvent.equals("UPDATE") ? "referencing old" + #refType + " as \"OLD_" + #objectname + "\" new" + #refType + " as \"NEW_" + #objectname + "\"" : ""'/>

            <SetVar name="_ref1" value="#_refi.equals('') ? #_refd : #_refi"/>
            <SetVar name="_ref2" value="#_refu.equals('') ? #_ref1 : #_refu"/>

            <SetVar name="_references" value="#triggerTime.equals('BEFORE') ? '' : '\n  ' + #_ref2"/>

            <Command exectype="asis">
               <SQL><![CDATA[
create trigger "${triggerSchema}".${QB}${triggerName}${QE}
  ${triggerTime} ${triggerEvent}
  on "${schema}"."${objectname}"${_references}
  for each ${triggerType} MODE DB2SQL
${source}]]>
               </SQL>
            </Command>
            <Result>
               <![CDATA[Trigger <b>${schema}.${triggerName}</b> created.]]>
            </Result>
         </Action>
         <Separator/>

         <Action id="db2zos-table-script" label="Script Table" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,INSERT,UPDATE,DELETE,CREATE,DROP"/>

      </ActionGroup>

       <ActionGroup type="Column">
         <Action id="db2zos-column-comment" label="Comment Column" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${theTableName}</Default>
            </Input>
            <Input label="Column" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
                <Default>
                  <Command>
                     <SQL><![CDATA[select remarks from SYSIBM.SYSCOLUMNS  where TBCREATOR = '${schema}'  and TBNAME = '${theTableName}' and NAME = '${objectname}' ]]></SQL>
                  </Command>
               </Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on column "${schema}"."${theTableName}"."${objectname}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on ${schema}.${theTableName}.${objectname}?
            </Confirm>
         </Action>
      </ActionGroup>

      <ActionGroup type="View">
         <Action id="db2zos-view-drop" label="Drop View" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="View" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop view "${schema}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop view ${schema}.${objectname}?
            </Confirm>
            <Result>
               View ${schema}.${objectname} has been dropped!
            </Result>
         </Action>
        
         <Action id="db2zos-view-comment" label="Comment View" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="View" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
              <Default>
                  <Command>
                     <SQL><![CDATA[select remarks from sysibm.systables  where TYPE = 'V' and CREATOR = '${schema}' and NAME = '${objectname}' ]]></SQL>
                  </Command>
               </Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on table "${schema}"."${objectname}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on ${schema}.${objectname}?
            </Confirm>
         </Action>

         <Action id="db2zos-view-alter" label="Regenerate View" reload="true" icon="edit">
             <Command><SQL><![CDATA[alter view "${schema}"."${objectname}" REGENERATE ]]></SQL></Command>
             <Confirm>
               Really alter view ${schema}.${objectname}?
             </Confirm>
             <Result>
               View ${schema}.${objectname} has been altered!
             </Result>
         </Action>

      </ActionGroup>

     <ActionGroup type="TempTable">
         <Action id="db2zos-temptab-drop" label="Drop Table" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
         
            <Command><SQL><![CDATA[drop table "${schema}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Action id="db2zos-temporarytable-script" label="Script Table" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,INSERT,DELETE,CREATE,DROP"/>

      </ActionGroup>

      <ActionGroup type="Aliases">
         <Action id="db2zos-aliases-create" label="Create Alias" reload="true" icon="add">
            <Input label="Alias Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Alias Name" name="alias" style="text" editable="true"/>
            <Input label="Source Schema" name="sourceschema" style="list" editable="false">
               <Values>
                  <Command idref="db2zos.getSchemas"/>
               </Values>
               <Default>${schema}</Default>
            </Input>
            <Input label="Source Object" name="sourcename" style="list" editable="true">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select name
from   sysibm.systables
where  creator   =  '${sourceschema}' 
  and  type    in ('T', 'V')
order by name
                    ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command><SQL><![CDATA[create alias "${schema}".${QB}${alias}${QE} for "${sourceschema}"."${sourcename}"]]></SQL></Command>
            <Confirm>
               Really create alias ${schema}.${alias}?
            </Confirm>
            <Result>
               Alias ${schema}.${alias} has been created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Alias">
         <Action id="db2zos-alias-drop" label="Drop Alias" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Alias" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop alias "${schema}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop alias ${schema}.${objectname}?
            </Confirm>
            <Result>
               Alias ${schema}.${objectname} has been dropped!
            </Result>
         </Action>
         <Action id="db2zos-alias-comment" label="Comment Alias" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Alias" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
               <Default>
                  <Command>
                     <SQL><![CDATA[select remarks from sysibm.systables  where TYPE = 'A' and CREATOR = '${schema}' and NAME = '${objectname}' ]]></SQL>
                  </Command>
               </Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on alias "${schema}"."${objectname}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on ${schema}.${objectname}?
            </Confirm>
         </Action>
         <Separator/>

         <Action id="db2zos-alias-script" label="Script Alias" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,INSERT,UPDATE,DELETE"/>
         
      </ActionGroup>

      <ActionGroup type="Synonyms">
         <Action id="db2zos-synonyms-create" label="Create Synonym" reload="true" icon="add">
            <Input label="Synonym Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Synonym Name" name="synonym" style="text" editable="true"/>
            <Input label="Source Schema" name="sourceschema" style="list" editable="true">
               <Values>
                  <Command idref="db2zos.getSchemas"/>
               </Values>
            </Input>
            <Input label="Source Object" name="sourcename" style="list" editable="true">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
                        select name
                        from   sysibm.systables
                        where  creator   =  '${sourceschema}'
                        and  type    in ('T', 'V')
                        order by name
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command><SQL><![CDATA[create synonym ${QB}${synonym}${QE} for "${sourceschema}"."${sourcename}"]]></SQL></Command>
              <Confirm>
               Really create synonym ${synonym}?
             </Confirm>
             <Result>
              Synonym ${synonym} has been created!
             </Result>
         </Action>
      </ActionGroup>
      
      <ActionGroup type="Synonym">
         <Action id="db2zos-synonym-drop" label="Drop Synonym" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Synonym" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop synonym "${objectname}"]]></SQL></Command>
            <Confirm>
              Really drop synonym ${objectname}?
            </Confirm>
            <Result>
               Synonym ${objectname} has been dropped!
            </Result>    
        </Action>
      
      <Separator/>
      
         <Action id="db2zos-synonym-script" label="Script Synonym" icon="scriptObject"
            class="sqlBuilder"
            classargs="script-dialog,SELECT,SELECT *,INSERT,UPDATE,DELETE"/>
      
      </ActionGroup>


      <ActionGroup type="Index">
         <Action id="db2zos-index-drop" label="Drop Index" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${indexCreator}</Default>
            </Input>
            <Input label="Index" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop index "${indexCreator}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop index ${indexCreator}.${objectname}?
            </Confirm>
            <Result>
               Index ${indexCreator}.${objectname} dropped!
            </Result>
         </Action>
         <Action id="db2zos-index-rename" label="Rename Index" reload="true" icon="rename">
           <Input label="Schema" style="text" editable="false">
              <Default>${indexCreator}</Default>
           </Input>
           <Input label="Index" style="text" editable="false">
              <Default>${objectname}</Default>
           </Input>
           <Input label="New Index Name" name="newIndex" style="text"/>
           <Command>
              <SQL><![CDATA[rename index "${indexCreator}"."${objectname}" to ${QB}${newIndex}${QE}]]></SQL>
           </Command>
           <Confirm>
              Confirm rename of index ${schema}.${objectname} to ${newIndex}?
           </Confirm>
           <Result>
             Index ${objectname} renamed to ${newIndex}!
           </Result>
         </Action>
         
         <Action id="db2zos-index-comment" label="Comment Index" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${indexCreator}</Default>
            </Input>
            <Input label="Index" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
               <Default>
                  <Command>
                     <SQL><![CDATA[select remarks from sysibm.sysindexes where CREATOR = '${indexCreator}' and NAME = '${objectname}']]></SQL>
                  </Command>
               </Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on index "${indexCreator}"."${objectname}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on ${schema}.${objectname}?
            </Confirm>
         </Action>
         
         <Separator/>

      </ActionGroup>
      
      <ActionGroup type="Sequences">
         <Action id="db2zos-sequences-create" label="Create Sequence" reload="true" icon="add">
            <Input label="Sequence Owner" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Sequence Name" name="sequenceName" style="text"/>
            <Input label="Data Type" name="dataType" style="list">
               <Values>INTEGER|SMALLINT|BIGINT|DECIMAL</Values>
               <Default>INTEGER</Default>
            </Input>
            <Input label="Start With" name="startWith" style="text">
               <Default>1</Default>
            </Input>
            <Input label="Increment By" name="increment" style="text">
               <Default>1</Default>
            </Input>
            <Input label="Min Value" name="minValue" style="text">
               <Default></Default>
            </Input>
            <Input label="Max Value" name="maxValue" style="text">
               <Default></Default>
            </Input>
            <Input label="Cached Values" name="cache" style="text">
               <Default>20</Default>
            </Input>
            <Input label="Cycle" name="cycle" style="radio">
               <Values>no cycle|cycle</Values>
               <Labels>No Cycle|Cycle</Labels>
               <Default>no cycle</Default>
            </Input>
            <Input label="Order" name="order" style="radio">
               <Values>no order|order</Values>
               <Labels>No Order|Order</Labels>
               <Default>no order</Default>
            </Input>

            <SetVar name="_minValue" value="#minValue.trim().equals('') ? 'no minvalue' : 'minvalue ' + #minValue"/>
            <SetVar name="_maxValue" value="#maxValue.trim().equals('') ? 'no maxvalue' : 'maxvalue ' + #maxValue"/>

            <Command><SQL><![CDATA[create sequence "${schema}".${QB}${sequenceName}${QE} as ${dataType} start with ${startWith} increment by ${increment} ${_minValue} ${_maxValue} ${cycle} cache ${cache} ${order}]]></SQL></Command>
            <Result>
               Sequence ${schema}.${sequenceName} created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Sequence">
         <Action id="db2zos-sequence-drop" label="Drop Sequence" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Sequence" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Restrict" name="restrict" style="check">
               <Values>restrict</Values>
               <Default>restrict</Default>
            </Input>
            <Command><SQL><![CDATA[drop sequence "${schema}"."${objectname}" ${restrict}]]></SQL></Command>
            <Confirm>
               Really drop sequence ${schema}.${objectname}?
            </Confirm>
            <Result>
               Sequence ${schema}.${objectname} dropped!
            </Result>
         </Action>
         
         
         <Action id="db2zos-sequence-comment" label="Comment Sequence" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Sequence" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
                <Default>
                  <Command>
                     <SQL><![CDATA[select remarks from sysibm.syssequences  where SEQTYPE = 'S' and SCHEMA = '${schema}' and NAME = '${objectname}' ]]></SQL>
                  </Command>
               </Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on sequence "${schema}"."${objectname}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on ${schema}.${objectname}?
            </Confirm>
         </Action>
         

      </ActionGroup>
      
      <ActionGroup type="MaterializedQueryTable">
         <Action id="db2zos-materializedquerytable-drop" label="Drop Materialized Query Table" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Materialized Query Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop table "${schema}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop materialized query table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Materialized query table ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Action id="db2zos-materializedquerytable-comment" label="Comment Materialized Query Table" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Materialized Query Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
                <Default>
                  <Command>
                     <SQL><![CDATA[select remarks from sysibm.systables  where TYPE = 'M' and CREATOR = '${schema}' and NAME = '${objectname}' ]]></SQL>
                  </Command>
               </Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on table "${schema}"."${objectname}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on ${schema}.${objectname}?
            </Confirm>
         </Action>

         <Action id="db2zos-materializedquerytable-refresh" label="Refresh Materialized Query Table" reload="true">
            <Message type="info">Only possible on</Message>
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Materialized Query Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>

            <Command>
               <SQL><![CDATA[refresh table "${schema}"."${objectname}"]]></SQL>
            </Command>
            <Confirm>
               Really refresh materialized query table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Materialized query table ${schema}.${objectname} has been refreshed!
            </Result>
         </Action>

         <Separator/>
         
         <Action id="db2zos-materializedquerytable-script" label="Script Materialized Query Table" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *"/>

      </ActionGroup>

      <ActionGroup type="Function">
         <Action id="db2zos-function-drop" label="Drop Function" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop specific function "${schema}"."${db2zos.getFunctions.SPECIFICNAME}"]]></SQL></Command>
            <Confirm>
               Really drop function ${schema}.${objectname}?
            </Confirm>
            <Result>
               Function ${schema}.${objectname} dropped!
            </Result>
         </Action>
         
          <Action id="db2zos-function-comment" label="Comment Function" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
               <Default>${db2zos.getFunctions.REMARKS}</Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on specific function "${schema}"."${db2zos.getFunctions.SPECIFICNAME}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on ${schema}.${objectname}?
            </Confirm>
         </Action>
      </ActionGroup>

      <ActionGroup type="Procedure">
         <Action id="db2zos-procedure-drop" label="Drop Procedure" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Procedure" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop procedure "${schema}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop procedure ${schema}.${objectname}?
            </Confirm>
            <Result>
               Procedure ${schema}.${objectname} dropped!
            </Result>
         </Action>
         
         <Action id="db2zos-procedure-comment" label="Comment Procedure" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Procedure" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
               <Default>${db2zos.getProcedures.REMARKS}</Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on procedure "${schema}"."${db2zos.getProcedures.SPECIFICNAME}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on ${schema}.${objectname}?
            </Confirm>
         </Action>
         
      </ActionGroup>
      <ActionGroup type="Package">
         <Action id="db2zos-package-drop" label="Drop Package" reload="true" icon="remove">
         <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Package" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop package "${schema}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop package ${schema}.${objectname}?
            </Confirm>
            <Result>
               Procedure ${schema}.${objectname} dropped!
            </Result>
         </Action>
      </ActionGroup>
      
      <ActionGroup type="Trigger">
         <Action id="db2zos-trigger-drop" label="Drop Trigger" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${objectSchema}</Default>
            </Input>
            <Input label="Trigger" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop trigger "${objectSchema}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop trigger ${objectSchema}.${objectname}?
            </Confirm>
            <Result>
               Trigger ${objectSchema}.${objectname} dropped!
            </Result>
         </Action>
         
         <Action id="db2zos-trigger-comment" label="Comment Trigger" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${objectSchema}</Default>
            </Input>
            <Input label="Trigger" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="wrapped-text-editor">
               <Default>${objectRemarks}</Default>
            </Input>
            <Command>
               <SQL><![CDATA[comment on trigger "${objectSchema}"."${objectname}" is '${comment}']]></SQL>
            </Command>
            <Confirm>
               Apply new comment on "${objectSchema}".${objectname}?
            </Confirm>
         </Action>
      </ActionGroup>
      
      <ActionGroup type="Tablespace">
        <Action id="db2zos-tablespace-drop" label="Drop Tablespace" reload="true" icon="remove">
           <Input label="Database" name="zosdatabase" style="text">
              <Default>
                <Command>
                   <SQL><![CDATA[select DBNAME from sysibm.systablespace where  NAME = '${objectname}']]></SQL>
                </Command>
              </Default>
          </Input>
          <Input label="Tablespace" name="zostablespace" style="text">
             <Default>${objectname}</Default>
          </Input>
          <Command>
             <SQL><![CDATA[drop tablespace "${zosdatabase}"."${zostablespace}"]]></SQL>
          </Command>
         <Confirm>
            Really drop tablespace ${zosdatabase}.${objectname}?
         </Confirm>
         <Result>
            Tablespace ${zosdatabase}.${objectname} dropped!
         </Result>
       </Action>


       <Action id="db2zos_tablespace_alter" label="Alter NON-PARTITIONED Tablespace" reload="true" icon="add">
          <Input label="Database Name" name="zos_tablespace_database_name" style="text" editable="false">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="DBNAME" />
                </Command>
             </Default>
          </Input>

          <Input label="Tablespace Name" name="zos_tablespace_tablespace_name" style="text" editable="false">
             <Default>${objectname}</Default>
          </Input>
          
           <Input label="VCAT/STOGROUP" name="zos_tablespace_using_name" style="radio" editable="false"
              tip=" Select to change to USING VCAT/ or USING STOGROUP">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="STORTYPE" />
                   <Input name="partitionnumber" value="0" />
                </Command>
             </Default>
             <Values>DONT_CHANGE|E|I</Values>
             <Labels>Do not change|VCAT|STOGROUP</Labels>
          </Input>

      
          <Input label="" style="label" linebreak="false"/>
          <Input label="VCAT Name" name="zosvcatname" style="list" editable="true">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="VCATNAME" />
                   <Input name="partitionnumber" value="0" />
                </Command>
             </Default>
             <Values></Values>
          </Input>
          <Input label="Stogroup Name" name="zosstogroupname" style="list" editable="false" linebreak="true">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="STORNAME" />
                   <Input name="partitionnumber" value="0" />
                </Command>
             </Default>
             <!-- concatenation dose not work for some reason , should be reported . -->
             <Values>
                <Command>
                   <SQL>
                   <![CDATA[
                   select name
                   from   sysibm.sysstogroup
                   ]]>
                   </SQL>
                </Command>
             </Values>
          </Input>

          <SetVar name="zos_tablespace_using_clause"
             value='(#zos_tablespace_using_name neq "DONT_CHANGE") ? (#zos_tablespace_using_name.equals("I") ? " USING STOGROUP " +#zosstogroupname : " USING VCAT " +#zosvcatname) : ""' />

          <Input label="Space allocation" style="label" editable="true" linebreak="false"/>
          <Input label="PRIQTY" name="zos_tablespace_priqty_name" style="list" editable="true"
             tip="In KB , -1 means automatic space allocation">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="PQTY" />
                   <Input name="partitionnumber" value="0" />
                </Command>
             </Default>
             <Values>Do not change defined value|-1</Values>
          </Input>
          <SetVar name="zos_tablespace_priqty_clause"
             value='#zos_tablespace_priqty_name neq "Do not change defined value" ? (#zos_tablespace_priqty_name eq "" ? "" : " PRIQTY "+#zos_tablespace_priqty_name) : ""' />

          <Input label="SECQTY" name="zos_tablespace_secqty_name" style="list" editable="true" linebreak="true"
             tip="In KB , -1 means automatic space allocation">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="SQTY" />
                   <Input name="partitionnumber" value="0" />
                </Command>
             </Default>
             <Values>Do not change defined value|-1</Values>
          </Input>
          <SetVar name="zos_tablespace_secqty_clause"
             value='#zos_tablespace_secqty_name neq "Do not change defined value" ? (#zos_tablespace_secqty_name eq "" ? "" : " SECQTY "+#zos_tablespace_secqty_name) : ""' />

         <Input label="Erase" name="zos_tablespace_erase_name" style="radio" editable="false">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="ERASERULE" />
                </Command>
             </Default>
             <Values>DONT_CHANGE|Y|N</Values>
             <Labels>Do not change|Yes|No</Labels>
          </Input>
          
          <SetVar name="zos_tablespace_erase_clause"
                 value='(#zos_tablespace_erase_name eq "DONT_CHANGE") ? "" : ((#zos_tablespace_erase_name eq "Y") ? " ERASE YES " : " ERASE NO ")' />

          <Input label="Freepage" name="zos_tablespace_freepage_name" style="list" editable="true">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="FREEPAGE" />
                   <Input name="partitionnumber" value="0" />
                </Command>
             </Default>
             <Values>Do not change defined value|0</Values>
          </Input>
          <SetVar name="zos_tablespace_freepage_clause"
             value='#zos_tablespace_freepage_name neq "Do not change defined value" ? " FREEPAGE "+#zos_tablespace_freepage_name : ""' />

          <Input label="PCTFREE" name="zos_tablespace_pctfree_name" style="list" editable="true">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="PCTFREE" />
                   <Input name="partitionnumber" value="0" />
                </Command>
             </Default>
             <Values>Do not change defined value|5</Values>
          </Input>
          <SetVar name="zos_tablespace_pctfree_clause"
                  value='#zos_tablespace_pctfree_name neq "Do not change defined value" ? " PCTFREE "+#zos_tablespace_pctfree_name : ""' />

          <Input label="GBPCACHE" name="zos_tablespace_gbpcache_name" style="list" editable="false">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="GBPCACHE" />
                   <Input name="partitionnumber" value="0" />
                   <ProcessDataSet action="trimcolumn" index="1"/>
                </Command>
             </Default>
             <Values>DONT_CHANGE|A|S|N|</Values>
             <Labels>Do not change|ALL|SYSTEM|NONE|CHANGED</Labels>
          </Input>
          <SetVar name="zos_tablespace_gbpcache_clause"
                  value='#zos_tablespace_gbpcache_name eq "DONT_CHANGE" ? "" : (#zos_tablespace_gbpcache_name eq "" ? " GBPCACHE CHANGED " : (#zos_tablespace_gbpcache_name eq "N" ? " GBPCACHE NONE "  : (#zos_tablespace_gbpcache_name eq "S" ? " GBPCACHE SYSTEM " : (#zos_tablespace_gbpcache_name eq "A" ? " GBPCACHE ALL " : ""))))' />

          <Input label="Logged" name="zos_tablespace_logged_name" style="radio" editable="false">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="LOG" />
                </Command>
             </Default>
             <Values>DONT_CHANGE|Y|N</Values>
             <Labels>Do not change|Yes|No</Labels>
          </Input>
          <SetVar name="zos_tablespace_logged_clause"
                 value='#zos_tablespace_logged_name neq "DONT_CHANGE" ? (#zos_tablespace_logged_name eq "Y" ? " LOGGED " : " NOT LOGGED ") : ""' />

          <Input label="Compress" name="zos_tablespace_compress_name" style="radio" editable="false">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="COMPRESS" />
                   <Input name="partitionnumber" value="0" />
                   <ProcessDataSet action="trimcolumn" index="1"/>
                </Command>
             </Default>
             <Values>DONT_CHANGE|Y|</Values>
             <Labels>Do not change|Yes|No</Labels>
          </Input>
           <!-- As db2 returns a single space in the COMPRESS column representing "No" we need to trim the output.
                        (Values can not contain a space as last value as the element is trimmed when read from XML)  -->

          <SetVar name="zos_tablespace_compress_clause"
                  value='#zos_tablespace_compress_name neq "DONT_CHANGE" ? (#zos_tablespace_compress_name eq "" ? " COMPRESS NO " : " COMPRESS YES ") : ""' />

          <Input label="TRACKMOD" name="zos_tablespace_trackmod_name" style="radio" editable="false">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue2">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="TRACKMOD" />
                   <Input name="partitionnumber" value="0" />
                </Command>
             </Default>
             <Values>DONT_CHANGE| |N</Values>
             <Labels>Do not change|Yes|No</Labels>
          </Input>
          <SetVar name="zos_tablespace_trackmod_clause"
                 value='#zos_tablespace_trackmod_name neq "DONT_CHANGE" ? (#zos_tablespace_trackmod_name eq "N" ? " TRACKMOD NO " : " TRACKMOD YES ") : ""' />

          <Input label="Bufferpool" name="zos_tablespace_bufferpool_name" style="list" editable="true">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="BPOOL" />
                </Command>
             </Default>
             <Values>Do not change defined value|BP0</Values>
          </Input>
          <SetVar name="zos_tablespace_bufferpool_clause"
                 value='#zos_tablespace_bufferpool_name.equals("Do not change defined value") ? "" : (#zos_tablespace_bufferpool_name eq "" ? "" : " BUFFERPOOL "+#zos_tablespace_bufferpool_name)' />

          <Input label="Lock" style="label" linebreak="false"/>
          <Input label="Locksize" name="zos_tablespace_locksize_name" style="list" editable="false">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="LOCKRULE" />
                </Command>
             </Default>
             <Values>DONT_CHANGE|A|L|P|R|S|T</Values>
             <Labels>Do not change|ANY|LOB|PAGE|ROW|TABLESPACE|TABLE</Labels>
          </Input>
          <SetVar name="zos_tablespace_locksize_clause"
                  value='#zos_tablespace_locksize_name.equals("Do not change defined value") ? "" : (#zos_tablespace_locksize_name eq "" ? "" : (#zos_tablespace_locksize_name eq "A" ? "  LOCKSIZE ANY " : (#zos_tablespace_locksize_name eq "L" ? "  LOCKSIZE LOB " : (#zos_tablespace_locksize_name eq "P" ? "  LOCKSIZE PAGE " : (#zos_tablespace_locksize_name eq "R" ? "  LOCKSIZE ROW " : (#zos_tablespace_locksize_name eq "S" ? "  LOCKSIZE TABLESPACE  " : (#zos_tablespace_locksize_name eq "T" ? "  LOCKSIZE TABLE " : (#zos_tablespace_locksize_name eq "X" ? "" : ""))))))))' />

          <Input label="Lockmax" name="zos_tablespace_lockmax_name" style="list" editable="true" linebreak="true"
                   tip="  -1  :  SYSTEM   --   0  :  escalation does not occur  ">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="LOCKMAX" />
                </Command>
             </Default>
             <Values>Do not change defined value|SYSTEM|0</Values>
          </Input>
          <SetVar name="zos_tablespace_lockmax_clause"
                  value='#zos_tablespace_lockmax_name.equals("Do not change defined value") ? "" : (#zos_tablespace_lockmax_name eq "" ? "" : (#zos_tablespace_lockmax_name eq "-1" ? " LOCKMAX SYSTEM " : " LOCKMAX "+#zos_tablespace_lockmax_name))' />

          <Input label="Close" name="zos_tablespace_close_name" style="radio" editable="false">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="CLOSERULE" />
                </Command>
             </Default>
             <Values>DONT_CHANGE|Y|N</Values>
             <Labels>Do not change|Yes|No</Labels>
          </Input>
          <SetVar name="zos_tablespace_close_clause"
                 value='#zos_tablespace_close_name.equals("DONT_CHANGE") ? "" : (#zos_tablespace_close_name eq "" ? "" : (#zos_tablespace_close_name eq "Y" ? " CLOSE YES " : " CLOSE NO "))' />

          <!-- CCSID https://www-01.ibm.com/support/knowledgecenter/api/content/nl/sv/SSEPEK_11.0.0/com.ibm.db2z11.doc.sqlref/src/tpc/db2z_sql_alterdatabase.html#db2z_sql_alterdatabase__nadbs -->
          <Input label="CCSID" name="zos_tablespace_ccsid_value" style="list" editable="true"
                   tip=" Note that only certain transitions are allowed.    ">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="SBCS_CCSID" />
                </Command>
             </Default>
             <Values>Do not change defined value|1140|1141|1142|1143|1144|1145|1146|1147|1148|1149|858|4970|5346|5347|5348|5349|5350|5351|5352|5353</Values>
          </Input>
          <SetVar name="zos_tablespace_ccsid_clause"
                 value='#zos_tablespace_ccsid_value.equals("Do not change defined value") ? "" : " CCSID " + #zos_tablespace_ccsid_value ' />

          <Input label="MAXROWS" name="zos_tablespace_maxrows_name" style="list" editable="true"
                   tip="Enter 0~255 , For a LOB table space 0 indicates that the column is not applicable">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="MAXROWS" />
                </Command>
             </Default>
             <Values>Do not change defined value</Values>
          </Input>
          <SetVar name="zos_tablespace_maxrows_clause"
                 value='#zos_tablespace_maxrows_name.equals("Do not change defined value") ? "" : (#zos_tablespace_maxrows_name eq "" ? "" : " MAXROWS "+#zos_tablespace_maxrows_name)' />

          <Input label="MAXPARTITIONS" name="zos_tablespace_maxpartitions_name" style="list" editable="false"
                   tip="0 means NON-PARTITIONED tablespace">
             <Default>
                <Command idref="db2zos.TableSpace-getcolumnvalue1">
                   <Input name="objectname" value="${objectname}" />
                   <Input name="columnname" value="MAXPARTITIONS" />
                </Command>
             </Default>
             <Values>Do not change defined value|0</Values>
          </Input>
          <SetVar name="zos_tablespace_maxpartitions_clause"
                 value='#zos_tablespace_maxpartitions_name.equals("Do not change defined value") ? "" : (#zos_tablespace_maxpartitions_name eq "" ? "" : " MAXPARTITION "+#zos_tablespace_maxpartitions_name)' />

          <Command>
             <SQL><![CDATA[alter 
                 tablespace ${zos_tablespace_database_name}.${zos_tablespace_tablespace_name}  ${zos_tablespace_using_clause} ${zos_tablespace_priqty_clause}  ${zos_tablespace_secqty_clause} ${zos_tablespace_erase_clause}  ${zos_tablespace_freepage_clause}  ${zos_tablespace_pctfree_clause}  ${zos_tablespace_gbpcache_clause}  ${zos_tablespace_logged_clause} ${zos_tablespace_compress_clause}  ${zos_tablespace_trackmod_clause}  ${zos_tablespace_bufferpool_clause} ${zos_tablespace_locksize_clause} ${zos_tablespace_lockmax_clause} ${zos_tablespace_close_clause} ${zos_tablespace_ccsid_clause} ${zos_tablespace_maxrows_clause} ${zos_tablespace_maxpartitions_clause} ]]>
             </SQL>
          </Command>
          <Confirm>
             Really alter tablespace ${zos_tablespace_tablespace_name}?
          </Confirm>
          <Result>
             TableSpace ${zos_tablespace_tablespace_name} has been altered!
          </Result>
       </Action>

    </ActionGroup>

    <ActionGroup type="Tablespaces">
       <If test="#util.isDatabaseVersionLTE(8,1)">
          <Action id="db2zos-tablespace-create-simple" label="Create Simple TableSpace" reload="true" icon="add">
             <Message>Creating SIMPLE databases (version 8.1 and earlier)</Message>
    
             <Input label="Tablespace Name" name="zos_tablespace_tablespace_name" style="text" editable="true" />
             <Input label="Database Name" name="zos_tablespace_database_name" style="list" editable="false">
                <Default>DSNDB04</Default>
                <Values>
                   <Command>
                      <SQL><![CDATA[select strip(name) from   sysibm.sysdatabase]]></SQL>
                   </Command>
                </Values>
             </Input>
    
             <Input label="VCAT/Storage Group"  name="zos_tablespace_using_name" style="radio">
               <Values>DEF|VCAT|STOGROUP</Values>
               <Labels>Use Default|VCAT|Storage Group</Labels>
               <Default>DEF</Default>
             </Input>
            
             <Input label=""  style="label" editable="false" linebreak="false"/>

             <Input label="VCAT Name" name="zosvcatname" style="text" editable="true"
                tip="Fill only if you selected VCAT option otherwise you can leave it blank.">
                 <Default></Default>
             </Input>
             <Input label="Storage Group Name" name="zosstogroupname" style="list" editable="false" linebreak="true">
             <Default></Default>
                <Values>
                   <Command>
                      <SQL><![CDATA[select name from   sysibm.sysstogroup]]></SQL>
                   </Command>
                </Values>
             </Input>
    
             <SetVar name="zos_tablespace_using_clause"
                value='(#zos_tablespace_using_name neq "DEF") ? (#zos_tablespace_using_name.equals("STOGROUP") ? " USING STOGROUP " +#zosstogroupname : " USING VCAT " +#zosvcatname) : ""' />
    
             <Input label="Space allocation" style="label" editable="true" linebreak="false"
                tip="Values In KB , -1 means automatic space allocation"/>
             <Input label="PRIQTY" name="zos_tablespace_priqty_name" style="text" editable="true"
                tip="In KB , -1 means automatic space allocation. Blank = Use default, PRIQTY parameter not included "/>
          
             <Input label="SECQTY" name="zos_tablespace_secqty_name" style="text" editable="true" linebreak="true"
                tip="In KB , -1 means automatic space allocation Blank = Use default, SECQTY parameter not included"/>
    
             <SetVar name="zos_tablespace_priqty_clause"
                value='#zos_tablespace_priqty_name neq "" ? " PRIQTY "+#zos_tablespace_priqty_name : ""' />
             <SetVar name="zos_tablespace_secqty_clause"
                value='#zos_tablespace_secqty_name neq "" ? " SECQTY "+#zos_tablespace_secqty_name : ""' />
    
             <Input label="Erase"  name="zos_tablespace_erase_name" style="radio">
                <Values>DEF|NO|YES</Values>
                <Labels>Use Default|No|Yes</Labels>
                <Default>DEF</Default>
             </Input>
    
             <SetVar name="zos_tablespace_erase_clause" value='#zos_tablespace_erase_name neq "DEF" ? " ERASE "+#zos_tablespace_erase_name : ""' />
    
             <Input label="Freepage" name="zos_tablespace_freepage_name" style="list" editable="true" >
               <Default>Use Default</Default>
               <Values>Use Default|0</Values>
             </Input>
             <SetVar name="zos_tablespace_freepage_clause"
               value='#zos_tablespace_freepage_name neq "Use Default" ? " FREEPAGE "+#zos_tablespace_freepage_name : ""' />
   
             <Input label="PCTFREE" name="zos_tablespace_pctfree_name" style="list" editable="true" tip="Percentage of each page to leave as free space when the table is loaded or reorganized">
                <Default>Use Default</Default>
                <Values>Use Default|5</Values>
             </Input>
          
             <SetVar name="zos_tablespace_pctfree_clause" value='#zos_tablespace_pctfree_name neq "Use Default" ? " PCTFREE "+#zos_tablespace_pctfree_name : ""' />
    
             <Input label="GBP Cache"  name="zos_tablespace_gbpcache_name" style="radio">
                <Values>DEF|CHANGED|SYSTEM|ALL|NONE</Values>
                <Labels>Use Default|CHANGED|SYSTEM|ALL|NONE</Labels>
                <Default>DEF</Default>
             </Input>
             <SetVar name="zos_tablespace_gbpcache_clause" value='#zos_tablespace_gbpcache_name neq "DEF" ? " GBPCACHE "+#zos_tablespace_gbpcache_name : ""' />
        
             <Input label="Define"  name="zos_tablespace_define_name" style="radio">
                <Values>DEF|YES|NO</Values>
                <Labels>Use Default|Yes|No</Labels>
                <Default>DEF</Default>
             </Input>
             <SetVar name="zos_tablespace_define_clause" value='#zos_tablespace_define_name neq "DEF" ? " DEFINE "+#zos_tablespace_define_name : ""' />
    
             <Input label="Logged"  name="zos_tablespace_logged_name" style="radio">
                <Values>DEF|LOGGED|NOT LOGGED</Values>
                <Labels>Use Default|Logged|Not Logged</Labels>
                <Default>DEF</Default>
             </Input>
             <SetVar name="zos_tablespace_logged_clause"  value='#zos_tablespace_logged_name neq "DEF" ? "${zos_tablespace_logged_name}" : ""' />
      
             <Input label="Compress"  name="zos_tablespace_compress_name" style="radio">
                 <Values>DEF|YES|NO</Values>
                 <Labels>Use Default|Yes|No</Labels>
                 <Default>DEF</Default>
             </Input>
             <SetVar name="zos_tablespace_compress_clause" value='#zos_tablespace_compress_name neq "DEF" ? " COMPRESS "+#zos_tablespace_compress_name : ""' />
    
             <Input label="TRACKMOD"  name="zos_tablespace_trackmod_name" style="radio" tip="Track modified pages">
                <Values>DEF|YES|NO</Values>
                <Labels>Use Default|Yes|No</Labels>
                <Default>DEF</Default>
             </Input>
             <SetVar name="zos_tablespace_trackmod_clause" value='#zos_tablespace_trackmod_name neq "DEF" ? " TRACKMOD "+#zos_tablespace_trackmod_name : ""' />
    
             <Input label="Member Cluster" name="zos_tablespace_membercluster_name" style="check" editable="false">
                <Values>selected</Values>
             </Input>
             <SetVar name="zos_tablespace_member_cluster_clause" value='#zos_tablespace_membercluster_name.equals("selected") ? " Member Cluster " : ""' />
    
             <Input label="Bufferpool" name="zos_tablespace_bufferpool_name" style="list" editable="true">
                <Default>Use Default</Default>
                <Values>Use Default|BP0</Values>
             </Input>
             <SetVar name="zos_tablespace_bufferpool_clause" value='#zos_tablespace_bufferpool_name.equals("Use Default") ? "" : " BUFFERPOOL "+#zos_tablespace_bufferpool_name' />
          
             <Input label="Lock" style="label" linebreak="false"/>
             <Input label="Locksize" name="zos_tablespace_locksize_name" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|ANY|TABLESPACE|TABLE|PAGE|ROW</Values>
             </Input>
             <SetVar name="zos_tablespace_locksize_clause" value='#zos_tablespace_locksize_name.equals("Use Default") ? "" : " LOCKSIZE "+#zos_tablespace_locksize_name' />
    
             <Input label="Lockmax" name="zos_tablespace_lockmax_name" style="list" editable="true" linebreak="true">
                <Default>Use Default</Default>
                <Values>Use Default|SYSTEM|0</Values>
             </Input>
             <SetVar name="zos_tablespace_lockmax_clause" value='#zos_tablespace_lockmax_name.equals("Use Default") ? "" : " LOCKMAX "+#zos_tablespace_lockmax_name' />
       
             <Input label="Close"  name="zos_tablespace_close_name" style="radio" tip="Specifies the priority in which data sets are closed">
                 <Values>DEF|YES|NO</Values>
                 <Labels>Use Default|Yes|No</Labels>
                 <Default>DEF</Default>
             </Input>
             <SetVar name="zos_tablespace_close_clause" value='#zos_tablespace_close_name.equals("DEF") ? "" : " CLOSE "+#zos_tablespace_close_name' />
       
            <Input label="CCSID" name="zos_tablespace_ccsid_name" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|EBCDIC|ASCII|UNICODE</Values>
             </Input>
             <SetVar name="zos_tablespace_ccsid_clause" value='#zos_tablespace_ccsid_name.equals("Use Default") ? "" : " CCSID "+#zos_tablespace_ccsid_name' />
       
             <Input label="MAXROWS" name="zos_tablespace_maxrows_name" style="list" editable="true" tip="Enter 0~255">
                <Default>Use Default</Default>
                <Values>Use Default</Values>
             </Input>
             <SetVar name="zos_tablespace_maxrows_clause" value='#zos_tablespace_maxrows_name.equals("Use Default") ? "" : " MAXROWS "+#zos_tablespace_maxrows_name' />
           
             <Command>
                <SQL><![CDATA[create 
             tablespace  ${zos_tablespace_tablespace_name} IN ${zos_tablespace_database_name} ${zos_tablespace_using_clause} ${zos_tablespace_priqty_clause}  ${zos_tablespace_secqty_clause} ${zos_tablespace_erase_clause}  ${zos_tablespace_freepage_clause}  ${zos_tablespace_pctfree_clause}  ${zos_tablespace_gbpcache_clause}  ${zos_tablespace_define_clause}   ${zos_tablespace_logged_clause} ${zos_tablespace_compress_clause}  ${zos_tablespace_trackmod_clause} ${zos_tablespace_member_cluster_clause} ${zos_tablespace_bufferpool_clause} ${zos_tablespace_locksize_clause} ${zos_tablespace_lockmax_clause} ${zos_tablespace_close_clause} ${zos_tablespace_ccsid_clause} ${zos_tablespace_maxrows_clause}
             ]]>
                </SQL>
             </Command>
             <Confirm>
                Really create simple tablespace ${zos_tablespace_tablespace_name} ?
             </Confirm>
             <Result>
                TableSpace ${zos_tablespace_tablespace_name} has been created !
             </Result>
          </Action>
       </If>
       <Action id="db2zos-tablespace-create-Segmented" label="Create Segmented Tablespace" reload="true"
          icon="add">
    
          <Input label="Tablespace Name" name="zos_tablespace_tablespace_name" style="text" editable="true" />
    
          <Input label="Database Name" name="zos_tablespace_database_name" style="list" editable="false">
             <Default>DSNDB04</Default>
             <Values>
                <Command>
                   <SQL>
                 <![CDATA[
                   select strip(name)
                   from   sysibm.sysdatabase
                 ]]>
                   </SQL>
                </Command>
             </Values>
          </Input>
    
           <Input label="VCAT/Storage Group"  name="zos_tablespace_using_name" style="radio">
               <Values>DEF|VCAT|STOGROUP</Values>
               <Labels>Use Default|VCAT|Storage Group</Labels>
               <Default>DEF</Default>
            </Input>
            
          <Input label="" name="notvisible" style="label" editable="false" linebreak="false"/>

          <Input label="VCAT Name" name="zosvcatname" style="text" editable="true"
             tip="Fill only if you selected VCAT option otherwise you can leave it blank."
          >
             <Default></Default>
          </Input>
          <Input label="Storage Group Name" name="zosstogroupname" style="list" editable="false" linebreak="true">
             <Default></Default>
             <Values>
                <Command>
                   <SQL>
                   <![CDATA[
                   select name
                   from   sysibm.sysstogroup
                   ]]>
                   </SQL>
                </Command>
             </Values>
          </Input>
    
          <SetVar name="zos_tablespace_using_clause"
             value='(#zos_tablespace_using_name neq "DEF") ? (#zos_tablespace_using_name.equals("STOGROUP") ? " USING STOGROUP " +#zosstogroupname : " USING VCAT " +#zosvcatname) : ""' />
    
          <Input label="Space allocation" name="xx" style="label" editable="true" linebreak="false"
             tip="Values In KB , -1 means automatic space allocation"
          />
          <Input label="PRIQTY" name="zos_tablespace_priqty_name" style="text" editable="true"
             tip="In KB , -1 means automatic space allocation. Blank = Use default, PRIQTY parameter not included "
          />
          
          <Input label="SECQTY" name="zos_tablespace_secqty_name" style="text" editable="true" linebreak="true"
             tip="In KB , -1 means automatic space allocation Blank = Use default, SECQTY parameter not included"
          />
    
          <SetVar name="zos_tablespace_priqty_clause"
             value='#zos_tablespace_priqty_name neq "" ? " PRIQTY "+#zos_tablespace_priqty_name : ""' />
    
          <SetVar name="zos_tablespace_secqty_clause"
             value='#zos_tablespace_secqty_name neq "" ? " SECQTY "+#zos_tablespace_secqty_name : ""' />
    
           <Input label="Erase"  name="zos_tablespace_erase_name" style="radio">
              <Values>DEF|NO|YES</Values>
              <Labels>Use Default|No|Yes</Labels>
              <Default>DEF</Default>
           </Input>
    
          <SetVar name="zos_tablespace_erase_clause" value='#zos_tablespace_erase_name neq "DEF" ? " ERASE "+#zos_tablespace_erase_name : ""' />
    
          
          <Input label="Freepage" name="zos_tablespace_freepage_name" style="list" editable="true" >
             <Default>Use Default</Default>
             <Values>Use Default|0</Values>
          </Input>
          <SetVar name="zos_tablespace_freepage_clause"
             value='#zos_tablespace_freepage_name neq "Use Default" ? " FREEPAGE "+#zos_tablespace_freepage_name : ""' />
    
    
          <Input label="PCTFREE" name="zos_tablespace_pctfree_name" style="list" editable="true" tip="Percentage of each page to leave as free space when the table is loaded or reorganized">
             <Default>Use Default</Default>
             <Values>Use Default|5</Values>
          </Input>
          
          <SetVar name="zos_tablespace_pctfree_clause" value='#zos_tablespace_pctfree_name neq "Use Default" ? " PCTFREE "+#zos_tablespace_pctfree_name : ""' />
    
          <Input label="GBP Cache"  name="zos_tablespace_gbpcache_name" style="radio">
              <Values>DEF|CHANGED|SYSTEM|ALL|NONE</Values>
              <Labels>Use Default|CHANGED|SYSTEM|ALL|NONE</Labels>
              <Default>DEF</Default>
           </Input>
          <SetVar name="zos_tablespace_gbpcache_clause" value='#zos_tablespace_gbpcache_name neq "DEF" ? " GBPCACHE "+#zos_tablespace_gbpcache_name : ""' />
    
          <Input label="Define"  name="zos_tablespace_define_name" style="radio">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_define_clause" value='#zos_tablespace_define_name neq "DEF" ? " DEFINE "+#zos_tablespace_define_name : ""' />
    
          <Input label="Logged"  name="zos_tablespace_logged_name" style="radio">
              <Values>DEF|LOGGED|NOT LOGGED</Values>
              <Labels>Use Default|Logged|Not Logged</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_logged_clause"  value='#zos_tablespace_logged_name neq "DEF" ? "${zos_tablespace_logged_name}" : ""' />
    
          <Input label="Compress"  name="zos_tablespace_compress_name" style="radio">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_compress_clause" value='#zos_tablespace_compress_name neq "DEF" ? " COMPRESS "+#zos_tablespace_compress_name : ""' />
    
          <Input label="TRACKMOD"  name="zos_tablespace_trackmod_name" style="radio" tip="Track modified pages">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_trackmod_clause" value='#zos_tablespace_trackmod_name neq "DEF" ? " TRACKMOD "+#zos_tablespace_trackmod_name : ""' />
    
          <Input label="Member Cluster" name="zos_tablespace_membercluster_name" style="check" editable="false">
             <Values>selected</Values>
          </Input>
          <SetVar name="zos_tablespace_member_cluster_clause" value='#zos_tablespace_membercluster_name.equals("selected") ? " Member Cluster " : ""' />
    
          <Input label="Bufferpool" name="zos_tablespace_bufferpool_name" style="list" editable="true">
             <Default>Use Default</Default>
             <Values>Use Default|BP0</Values>
          </Input>
          <SetVar name="zos_tablespace_bufferpool_clause" value='#zos_tablespace_bufferpool_name.equals("Use Default") ? "" : " BUFFERPOOL "+#zos_tablespace_bufferpool_name' />
          
          <Input label="Lock" style="label" linebreak="false"/>
          <Input label="Locksize" name="zos_tablespace_locksize_name" style="list" editable="false">
             <Default>Use Default</Default>
             <Values>Use Default|ANY|TABLESPACE|TABLE|PAGE|ROW</Values>
          </Input>
          <SetVar name="zos_tablespace_locksize_clause" value='#zos_tablespace_locksize_name.equals("Use Default") ? "" : " LOCKSIZE "+#zos_tablespace_locksize_name' />
    
          <Input label="Lockmax" name="zos_tablespace_lockmax_name" style="list" editable="true" linebreak="true">
             <Default>Use Default</Default>
             <Values>Use Default|SYSTEM|0</Values>
          </Input>
          <SetVar name="zos_tablespace_lockmax_clause" value='#zos_tablespace_lockmax_name.equals("Use Default") ? "" : " LOCKMAX "+#zos_tablespace_lockmax_name' />
    
          <Input label="Close"  name="zos_tablespace_close_name" style="radio" tip="Specifies the priority in which data sets are closed">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_close_clause" value='#zos_tablespace_close_name.equals("DEF") ? "" : " CLOSE "+#zos_tablespace_close_name' />
    
    
         <Input label="CCSID" name="zos_tablespace_ccsid_name" style="list" editable="false">
             <Default>Use Default</Default>
             <Values>Use Default|EBCDIC|ASCII|UNICODE</Values>
          </Input>
          <SetVar name="zos_tablespace_ccsid_clause" value='#zos_tablespace_ccsid_name.equals("Use Default") ? "" : " CCSID "+#zos_tablespace_ccsid_name' />
    
          <Input label="MAXROWS" name="zos_tablespace_maxrows_name" style="list" editable="true" tip="Enter 0~255">
             <Default>Use Default</Default>
             <Values>Use Default</Values>
          </Input>
          <SetVar name="zos_tablespace_maxrows_clause" value='#zos_tablespace_maxrows_name.equals("Use Default") ? "" : " MAXROWS "+#zos_tablespace_maxrows_name' />
    
          <Input label="SEGSIZE" name="zos_tablespace_segsize_name" style="list" editable="false">
             <Default>4</Default>
             <Values>4|8|12|16|20|24|28|32|36|40|44|48|52|56|60|64</Values>
          </Input>
          <SetVar name="zos_tablespace_segsize_clause" value='" SEGSIZE  "+#zos_tablespace_segsize_name' />
    
          <Command>
             <SQL><![CDATA[create 
       tablespace  ${zos_tablespace_tablespace_name} IN ${zos_tablespace_database_name} ${zos_tablespace_using_clause} ${zos_tablespace_priqty_clause}  ${zos_tablespace_secqty_clause} ${zos_tablespace_erase_clause}  ${zos_tablespace_freepage_clause}  ${zos_tablespace_pctfree_clause}  ${zos_tablespace_gbpcache_clause}  ${zos_tablespace_define_clause}   ${zos_tablespace_logged_clause} ${zos_tablespace_compress_clause}  ${zos_tablespace_trackmod_clause} ${zos_tablespace_member_cluster_clause} ${zos_tablespace_bufferpool_clause} ${zos_tablespace_locksize_clause} ${zos_tablespace_lockmax_clause} ${zos_tablespace_close_clause} ${zos_tablespace_ccsid_clause} ${zos_tablespace_maxrows_clause} ${zos_tablespace_segsize_clause}
       ]]>
             </SQL>
          </Command>
          <Confirm>
             Really create segmented tablespace ${zos_tablespace_tablespace_name} ?
          </Confirm>
          <Result>
             Tablespace ${zos_tablespace_tablespace_name} has been created!
          </Result>
       </Action>
    
       <Action id="db2zos-tablespace-create-partitioned" label="Create Partitioned Tablespace" reload="true"
          icon="add">
    
          <Input label="Large" name="zos_tablespace_large_name" style="check" editable="false"
             tip="if select this option the DSSIZE value will not be included">
             <Default></Default>
             <Values>selected</Values>
          </Input>
    
          <SetVar name="zos_tablespace_large_clause"
             value='((#zos_tablespace_large_name eq "selected") and (#util.isDatabaseVersionLT(10))) ? " LARGE "  : ""' />
    
          <Input label="Tablespace Name" name="zos_tablespace_tablespace_name" style="text" editable="true" />
    
          <Input label="Database Name" name="zos_tablespace_database_name" style="list" editable="false">
             <Default>DSNDB04</Default>
             <Values>
                <Command>
                   <SQL>
                   <![CDATA[
                   select strip(name)
                   from   sysibm.sysdatabase
                   ]]>
                   </SQL>
                </Command>
             </Values>
          </Input>
          <Input label="VCAT/Storage Group"  name="zos_tablespace_using_name" style="radio">
               <Values>DEF|VCAT|STOGROUP</Values>
               <Labels>Use Default|VCAT|Storage Group</Labels>
               <Default>DEF</Default>
          </Input>
          
          <Input label="" style="label" editable="false" linebreak="false"/>
          
          <Input label="VCAT Name" name="zosvcatname" style="text" editable="true"
             tip="Fill only if you selected VCAT option otherwise you can leave it blank.">
             <Default></Default>
          </Input>
          <Input label="Storage Group Name" name="zosstogroupname" style="list" editable="false" linebreak="true">
             <Default></Default>
             <Values>
                <Command>
                   <SQL>
                   <![CDATA[
                   select name
                   from   sysibm.sysstogroup
                   ]]>
                   </SQL>
                </Command>
             </Values>
          </Input>
    
          <SetVar name="zos_tablespace_using_clause"
             value='(#zos_tablespace_using_name neq "DEF") ? (#zos_tablespace_using_name.equals("STOGROUP") ? " USING STOGROUP " +#zosstogroupname : " USING VCAT " +#zosvcatname) : ""' />
    
          <Input label="Space allocation" name="xx" style="label" editable="true" linebreak="false"
             tip="Values In KB , -1 means automatic space allocation"/>
          <Input label="PRIQTY" name="zos_tablespace_priqty_name" style="text" editable="true"
             tip="In KB , -1 means automatic space allocation. Blank = Use default, PRIQTY parameter not included "/>
          
          <Input label="SECQTY" name="zos_tablespace_secqty_name" style="text" editable="true" linebreak="true"
             tip="In KB , -1 means automatic space allocation Blank = Use default, SECQTY parameter not included"/>  
    
          <SetVar name="zos_tablespace_priqty_clause" value='#zos_tablespace_priqty_name neq "" ? " PRIQTY "+#zos_tablespace_priqty_name : ""' />
          <SetVar name="zos_tablespace_secqty_clause" value='#zos_tablespace_secqty_name neq "" ? " SECQTY "+#zos_tablespace_secqty_name : ""' />
    
          <Input label="Erase"  name="zos_tablespace_erase_name" style="radio">
              <Values>DEF|NO|YES</Values>
              <Labels>Use Default|No|Yes</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_erase_clause" value='#zos_tablespace_erase_name neq "DEF" ? " ERASE "+#zos_tablespace_erase_name : ""' />
    
          <Input label="Freepage" name="zos_tablespace_freepage_name" style="list" editable="true" >
             <Default>Use Default</Default>
             <Values>Use Default|0</Values>
          </Input>
          <SetVar name="zos_tablespace_freepage_clause" value='#zos_tablespace_freepage_name neq "Use Default" ? " FREEPAGE "+#zos_tablespace_freepage_name : ""' />
    
          <Input label="PCTFREE" name="zos_tablespace_pctfree_name" style="list" editable="true" tip="Percentage of each page to leave as free space when the table is loaded or reorganized">
             <Default>Use Default</Default>
             <Values>Use Default|5</Values>
          </Input>
          <SetVar name="zos_tablespace_pctfree_clause" value='#zos_tablespace_pctfree_name neq "Use Default" ? " PCTFREE "+#zos_tablespace_pctfree_name : ""' />
    
          <Input label="GBP Cache"  name="zos_tablespace_gbpcache_name" style="radio">
              <Values>DEF|CHANGED|SYSTEM|ALL|NONE</Values>
              <Labels>Use Default|CHANGED|SYSTEM|ALL|NONE</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_gbpcache_clause" value='#zos_tablespace_gbpcache_name neq "DEF" ? " GBPCACHE "+#zos_tablespace_gbpcache_name : ""' />

          <Input label="Define"  name="zos_tablespace_define_name" style="radio">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>    
          <SetVar name="zos_tablespace_define_clause" value='#zos_tablespace_define_name neq "DEF" ? " DEFINE "+#zos_tablespace_define_name : ""' />
 
          <Input label="Logged"  name="zos_tablespace_logged_name" style="radio">
              <Values>DEF|LOGGED|NOT LOGGED</Values>
              <Labels>Use Default|Logged|Not Logged</Labels>
              <Default>DEF</Default>
          </Input>   
          <SetVar name="zos_tablespace_logged_clause" value='#zos_tablespace_logged_name neq "DEF" ? "${zos_tablespace_logged_name}" : ""' />
    
         <Input label="Compress"  name="zos_tablespace_compress_name" style="radio">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_compress_clause" value='#zos_tablespace_compress_name neq "DEF" ? " COMPRESS "+#zos_tablespace_compress_name : ""' />
 
          <Input label="TRACKMOD"  name="zos_tablespace_trackmod_name" style="radio" tip="Track modified pages">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_trackmod_clause" value='#zos_tablespace_trackmod_name neq "DEF" ? " TRACKMOD "+#zos_tablespace_trackmod_name : ""' />
    
          <Input label="DSSIZE" name="zos_tablespace_dssize_name" style="list" editable="false">
             <Default></Default>
             <Values>1G|2G|4G|8G|16G|32G|64G|128G|256G</Values>
          </Input>
    
          <SetVar name="zos_tablespace_dssize_clause"
             value='#zos_tablespace_large_name.equals("selected") ? "" : " DSSIZE "+#zos_tablespace_dssize_name' />
    
          <Input label="Numparts" name="zos_tablespace_numparts_name" style="number" editable="true" tip="Number of partitions">
             <Default>1</Default>
          </Input>
          <SetVar name="zos_tablespace_numparts_clause" value='" NUMPARTS "+#zos_tablespace_numparts_name' />
    
          <Input label="Partitions-Parameters" style="separator" />
    
          <Input name="zos_tablespace_partitions_parameters_name" style="grid">
    
             <Arg name="output"
                value=" PARTITION  ${zos_tablespace_partition_number_name} ${zos_tablespace_using_clause2} ${zos_tablespace_priqty_clause2}  ${zos_tablespace_secqty_clause2} ${zos_tablespace_erase_clause2}  ${zos_tablespace_freepage_clause2}  ${zos_tablespace_pctfree_clause2}  ${zos_tablespace_gbpcache_clause2}  ${zos_tablespace_compress_clause2}  ${zos_tablespace_trackmod_clause2}" />
             <Arg name="newline" value=", " />
    
             <Input label="Partition Number" name="zos_tablespace_partition_number_name" style="number"
                editable="true"
             >
                <Default>1</Default>
             </Input>
    
             <Input label="VCAT/Stogroup" name="zos_tablespace_using_name2" style="list" editable="false">
                <Default>STOGROUP</Default>
                <Values>Use Default|VCAT|STOGROUP</Values>
             </Input>
    
             <Input label="VCAT Name" name="zosvcatname2" style="text" editable="true"
                tip="Fill only if you selected VCAT option otherwise you can leave it blank."
             >
                <Default></Default>
             </Input>
    
             <Input label="Stogroup Name" name="zosstogroupname2" style="list" editable="false">
                <Default></Default>
                <Values>
                   <Command>
                      <SQL>
                      <![CDATA[
                      select name
                      from   sysibm.sysstogroup
                      ]]>
                      </SQL>
                   </Command>
                </Values>
             </Input>
    
             <SetVar name="zos_tablespace_using_clause2"
                value='(#zos_tablespace_using_name2 neq "Use Default") ? (#zos_tablespace_using_name2.equals("STOGROUP") ? " USING STOGROUP " +#zosstogroupname2 : " USING VCAT " +#zosvcatname2) : ""' />
    
             <Input label="PRIQTY" name="zos_tablespace_priqty_name2" style="list" editable="true"
                tip="In KB , -1 means automatic space allocation"
             >
                <Default>Use Default</Default>
                <Values>Use Default|-1</Values>
             </Input>
             <SetVar name="zos_tablespace_priqty_clause2"
                value='#zos_tablespace_priqty_name2 neq "Use Default" ? " PRIQTY "+#zos_tablespace_priqty_name2 : ""' />
    
             <Input label="SECQTY" name="zos_tablespace_secqty_name2" style="list" editable="true"
                tip="In KB , -1 means automatic space allocation"
             >
                <Default>Use Default</Default>
                <Values>Use Default|-1</Values>
             </Input>
             <SetVar name="zos_tablespace_secqty_clause2"
                value='#zos_tablespace_secqty_name2 neq "Use Default" ? " SECQTY "+#zos_tablespace_secqty_name2 : ""' />
    
             <Input label="Erase" name="zos_tablespace_erase_name2" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|NO|YES</Values>
             </Input>
             <SetVar name="zos_tablespace_erase_clause2"
                value='#zos_tablespace_erase_name2 neq "Use Default" ? " ERASE "+#zos_tablespace_erase_name2 : ""' />
    
             <Input label="Freepage" name="zos_tablespace_freepage_name2" style="list" editable="true">
                <Default>Use Default</Default>
                <Values>Use Default|0</Values>
             </Input>
             <SetVar name="zos_tablespace_freepage_clause2"
                value='#zos_tablespace_freepage_name2 neq "Use Default" ? " FREEPAGE "+#zos_tablespace_freepage_name2 : ""' />
    
             <Input label="PCTFREE" name="zos_tablespace_pctfree_name2" style="list" editable="true">
                <Default>Use Default</Default>
                <Values>Use Default|5</Values>
             </Input>
             <SetVar name="zos_tablespace_pctfree_clause2"
                value='#zos_tablespace_pctfree_name2 neq "Use Default" ? " PCTFREE "+#zos_tablespace_pctfree_name2 : ""' />
    
             <Input label="GBPCACHE" name="zos_tablespace_gbpcache_name2" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|CHANGED|SYSTEM|ALL|NONE</Values>
             </Input>
             <SetVar name="zos_tablespace_gbpcache_clause2"
                value='#zos_tablespace_gbpcache_name2 neq "Use Default" ? " GBPCACHE "+#zos_tablespace_gbpcache_name2 : ""' />
    
             <Input label="Compress" name="zos_tablespace_compress_name2" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|YES|NO</Values>
             </Input>
             <SetVar name="zos_tablespace_compress_clause2"
                value='#zos_tablespace_compress_name2 neq "Use Default" ? " COMPRESS "+#zos_tablespace_compress_name2 : ""' />
    
             <Input label="TRACKMOD" name="zos_tablespace_trackmod_name2" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|YES|NO</Values>
             </Input>
             <SetVar name="zos_tablespace_trackmod_clause2"
                value='#zos_tablespace_trackmod_name2 neq "Use Default" ? " TRACKMOD "+#zos_tablespace_trackmod_name2 : ""' />
    
          </Input>
          <SetVar name="zos_tablespace_partitions_parameters_clause"
             value='#zos_tablespace_partitions_parameters_name.equals("") ? "" : " ( "+#zos_tablespace_partitions_parameters_name+" ) "' />

          <Input label="Member Cluster" name="zos_tablespace_membercluster_name" style="check" editable="false">
             <Values>selected</Values>
          </Input>
          <SetVar name="zos_tablespace_member_cluster_clause" value='#zos_tablespace_membercluster_name.equals("selected") ? " Member Cluster " : ""' />
    
          <Input label="Bufferpool" name="zos_tablespace_bufferpool_name" style="list" editable="true">
             <Default>Use Default</Default>
             <Values>Use Default|BP0</Values>
          </Input>
          <SetVar name="zos_tablespace_bufferpool_clause"
             value='#zos_tablespace_bufferpool_name.equals("Use Default") ? "" : " BUFFERPOOL "+#zos_tablespace_bufferpool_name' />

          <Input label="Lock" style="label" linebreak="false"/>
          <Input label="Locksize" name="zos_tablespace_locksize_name" style="list" editable="false">
             <Default>Use Default</Default>
             <Values>Use Default|ANY|TABLESPACE|TABLE|PAGE|ROW</Values>
          </Input>
          <SetVar name="zos_tablespace_locksize_clause"
             value='#zos_tablespace_locksize_name.equals("Use Default") ? "" : " LOCKSIZE "+#zos_tablespace_locksize_name' />
    
         <Input label="Lockmax" name="zos_tablespace_lockmax_name" style="list" editable="true" linebreak="true">
             <Default>Use Default</Default>
             <Values>Use Default|SYSTEM|0</Values>
          </Input>
          <SetVar name="zos_tablespace_lockmax_clause"
             value='#zos_tablespace_lockmax_name.equals("Use Default") ? "" : " LOCKMAX "+#zos_tablespace_lockmax_name' />
    
          <Input label="Close"  name="zos_tablespace_close_name" style="radio" tip="Specifies the priority in which data sets are closed">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_close_clause" value='#zos_tablespace_close_name.equals("DEF") ? "" : " CLOSE "+#zos_tablespace_close_name' />
    
          <Input label="CCSID" name="zos_tablespace_ccsid_name" style="list" editable="false">
             <Default>Use Default</Default>
             <Values>Use Default|EBCDIC|ASCII|UNICODE</Values>
          </Input>
          <SetVar name="zos_tablespace_ccsid_clause"
             value='#zos_tablespace_ccsid_name.equals("Use Default") ? "" : " CCSID "+#zos_tablespace_ccsid_name' />
    
          <Input label="MAXROWS" name="zos_tablespace_maxrows_name" style="list" editable="true" tip="Enter 0~255">
              <Default>Use Default</Default>
             <Values>Use Default</Values>
          </Input>
          <SetVar name="zos_tablespace_maxrows_clause" value='#zos_tablespace_maxrows_name.equals("Use Default") ? "" : " MAXROWS "+#zos_tablespace_maxrows_name' />
    
          <SetVar name="zos_tablespace_segsize_clause" value='(#util.isDatabaseVersionLT(10)) ? "" : " SEGSIZE 0 "' />
    
          <Command>
             <SQL><![CDATA[create  ${zos_tablespace_large_clause} 
       tablespace  ${zos_tablespace_tablespace_name} IN ${zos_tablespace_database_name} ${zos_tablespace_using_clause} ${zos_tablespace_priqty_clause}  ${zos_tablespace_secqty_clause} ${zos_tablespace_erase_clause}  ${zos_tablespace_freepage_clause}  ${zos_tablespace_pctfree_clause}  ${zos_tablespace_gbpcache_clause}  ${zos_tablespace_define_clause}   ${zos_tablespace_logged_clause} ${zos_tablespace_compress_clause}  ${zos_tablespace_trackmod_clause} ${zos_tablespace_dssize_clause}   ${zos_tablespace_numparts_clause} ${zos_tablespace_partitions_parameters_clause} ${zos_tablespace_member_cluster_clause} ${zos_tablespace_bufferpool_clause} ${zos_tablespace_locksize_clause} ${zos_tablespace_lockmax_clause} ${zos_tablespace_close_clause} ${zos_tablespace_ccsid_clause} ${zos_tablespace_maxrows_clause} ${zos_tablespace_segsize_clause}
       ]]>
             </SQL>
          </Command>
          <Confirm>
             Really create partitioned tablespace ${zos_tablespace_tablespace_name} ?
          </Confirm>
          <Result>
             Tablespace ${zos_tablespace_tablespace_name} has been created!
          </Result>
       </Action>
    
       <Action id="db2zos-tablespace-create-universal-part-by-range" label="Create Universal  partitioned-by-range  Tablespace"
          reload="true" icon="add">
    
          <Input label="Large" name="zos_tablespace_large_name" style="check" editable="false"
             tip="if select this option the DSSIZE value will not included">
             <Default></Default>
             <Values>selected</Values>
          </Input>
    
          <SetVar name="zos_tablespace_large_clause"
             value='((#zos_tablespace_large_name eq "selected") and (#util.isDatabaseVersionLT(10))) ? " LARGE "  : ""' />
    
          <Input label="Tablespace Name" name="zos_tablespace_tablespace_name" style="text" editable="true" />
    
          <Input label="Database Name" name="zos_tablespace_database_name" style="list" editable="false">
             <Default>DSNDB04</Default>
             <Values>
                <Command>
                   <SQL>
                   <![CDATA[
                   select strip(name)
                   from   sysibm.sysdatabase
                   ]]>
                   </SQL>
                </Command>
             </Values>
          </Input>
    
            <Input label="VCAT/Storage Group"  name="zos_tablespace_using_name" style="radio">
                <Values>DEF|VCAT|STOGROUP</Values>
                <Labels>Use Default|VCAT|Storage Group</Labels>
                <Default>DEF</Default>
             </Input>
             
           <Input label=""  style="label" editable="false" linebreak="false"/>
 
           <Input label="VCAT Name" name="zosvcatname" style="text" editable="true"
              tip="Fill only if you selected VCAT option otherwise you can leave it blank.">
              <Default></Default>
           </Input>
           <Input label="Storage Group Name" name="zosstogroupname" style="list" editable="false" linebreak="true">
           <Default></Default>
              <Values>
                 <Command>
                    <SQL><![CDATA[select name from sysibm.sysstogroup]]></SQL>
                 </Command>
              </Values>
           </Input>
     
           <SetVar name="zos_tablespace_using_clause"
              value='(#zos_tablespace_using_name neq "DEF") ? (#zos_tablespace_using_name.equals("STOGROUP") ? " USING STOGROUP " +#zosstogroupname : " USING VCAT " +#zosvcatname) : ""' />
     
           <Input label="Space allocation" style="label" editable="true" linebreak="false"
              tip="Values In KB , -1 means automatic space allocation"/>
           <Input label="PRIQTY" name="zos_tablespace_priqty_name" style="text" editable="true"
              tip="In KB , -1 means automatic space allocation. Blank = Use default, PRIQTY parameter not included "/>
           
           <Input label="SECQTY" name="zos_tablespace_secqty_name" style="text" editable="true" linebreak="true"
              tip="In KB , -1 means automatic space allocation Blank = Use default, SECQTY parameter not included"/>
     
           <SetVar name="zos_tablespace_priqty_clause"
              value='#zos_tablespace_priqty_name neq "" ? " PRIQTY "+#zos_tablespace_priqty_name : ""' />
     
           <SetVar name="zos_tablespace_secqty_clause"
              value='#zos_tablespace_secqty_name neq "" ? " SECQTY "+#zos_tablespace_secqty_name : ""' />
     
            <Input label="Erase"  name="zos_tablespace_erase_name" style="radio">
               <Values>DEF|NO|YES</Values>
               <Labels>Use Default|No|Yes</Labels>
               <Default>DEF</Default>
            </Input>
     
           <SetVar name="zos_tablespace_erase_clause" value='#zos_tablespace_erase_name neq "DEF" ? " ERASE "+#zos_tablespace_erase_name : ""' />
    
          <Input label="Freepage" name="zos_tablespace_freepage_name" style="list" editable="true" >
              <Default>Use Default</Default>
              <Values>Use Default|0</Values>
           </Input>
           <SetVar name="zos_tablespace_freepage_clause"
              value='#zos_tablespace_freepage_name neq "Use Default" ? " FREEPAGE "+#zos_tablespace_freepage_name : ""' />
     
           <Input label="PCTFREE" name="zos_tablespace_pctfree_name" style="list" editable="true" tip="Percentage of each page to leave as free space when the table is loaded or reorganized">
              <Default>Use Default</Default>
              <Values>Use Default|5</Values>
           </Input>
           
           <SetVar name="zos_tablespace_pctfree_clause" value='#zos_tablespace_pctfree_name neq "Use Default" ? " PCTFREE "+#zos_tablespace_pctfree_name : ""' />
     
           <Input label="GBP Cache"  name="zos_tablespace_gbpcache_name" style="radio">
               <Values>DEF|CHANGED|SYSTEM|ALL|NONE</Values>
               <Labels>Use Default|CHANGED|SYSTEM|ALL|NONE</Labels>
               <Default>DEF</Default>
            </Input>
           <SetVar name="zos_tablespace_gbpcache_clause" value='#zos_tablespace_gbpcache_name neq "DEF" ? " GBPCACHE "+#zos_tablespace_gbpcache_name : ""' />
    
           <Input label="Define"  name="zos_tablespace_define_name" style="radio">
               <Values>DEF|YES|NO</Values>
               <Labels>Use Default|Yes|No</Labels>
               <Default>DEF</Default>
           </Input>
           <SetVar name="zos_tablespace_define_clause" value='#zos_tablespace_define_name neq "DEF" ? " DEFINE "+#zos_tablespace_define_name : ""' />
     
           <Input label="Logged"  name="zos_tablespace_logged_name" style="radio">
               <Values>DEF|LOGGED|NOT LOGGED</Values>
               <Labels>Use Default|Logged|Not Logged</Labels>
               <Default>DEF</Default>
           </Input>
           <SetVar name="zos_tablespace_logged_clause"  value='#zos_tablespace_logged_name neq "DEF" ? "${zos_tablespace_logged_name}" : ""' />
    
           <Input label="Compress"  name="zos_tablespace_compress_name" style="radio">
               <Values>DEF|YES|NO</Values>
               <Labels>Use Default|Yes|No</Labels>
               <Default>DEF</Default>
           </Input>
           <SetVar name="zos_tablespace_compress_clause" value='#zos_tablespace_compress_name neq "DEF" ? " COMPRESS "+#zos_tablespace_compress_name : ""' />
     
           <Input label="TRACKMOD"  name="zos_tablespace_trackmod_name" style="radio" tip="Track modified pages">
               <Values>DEF|YES|NO</Values>
               <Labels>Use Default|Yes|No</Labels>
               <Default>DEF</Default>
           </Input>
           <SetVar name="zos_tablespace_trackmod_clause" value='#zos_tablespace_trackmod_name neq "DEF" ? " TRACKMOD "+#zos_tablespace_trackmod_name : ""' />
    
          <Input label="DSSIZE" name="zos_tablespace_dssize_name" style="list" editable="false">
             <Default></Default>
             <Values>1G|2G|4G|8G|16G|32G|64G|128G|256G</Values>
          </Input>
    
          <SetVar name="zos_tablespace_dssize_clause"
             value='#zos_tablespace_large_name.equals("selected") ? "" : " DSSIZE "+#zos_tablespace_dssize_name' />
    
          <Input label="Numparts" name="zos_tablespace_numparts_name" style="number" editable="true">
             <Default>1</Default>
          </Input>
          <SetVar name="zos_tablespace_numparts_clause" value='" NUMPARTS "+#zos_tablespace_numparts_name' />
    
          <Input label="Partitions-Parameters" style="separator" />
    
          <Input name="zos_tablespace_partitions_parameters_name" style="grid">
    
             <Arg name="output"
                value=" PARTITION  ${zos_tablespace_partition_number_name} ${zos_tablespace_using_clause2} ${zos_tablespace_priqty_clause2}  ${zos_tablespace_secqty_clause2} ${zos_tablespace_erase_clause2}  ${zos_tablespace_freepage_clause2}  ${zos_tablespace_pctfree_clause2}  ${zos_tablespace_gbpcache_clause2}  ${zos_tablespace_compress_clause2}  ${zos_tablespace_trackmod_clause2}" />
             <Arg name="newline" value=", " />
    
             <Input label="Partition Number" name="zos_tablespace_partition_number_name" style="number"  editable="true">
                <Default>1</Default>
             </Input>
    
             <Input label="VCAT/Stogroup" name="zos_tablespace_using_name2" style="list" editable="false">
                <Default>STOGROUP</Default>
                <Values>Use Default|VCAT|STOGROUP</Values>
             </Input>
    
             <Input label="VCAT Name" name="zosvcatname2" style="text" editable="true"
                tip="Fill only if you selected VCAT option otherwise you can leave it blank.">
                <Default></Default>
             </Input>
    
             <Input label="Stogroup Name" name="zosstogroupname2" style="list" editable="false">
                <Default></Default>
                <Values>
                   <Command>
                      <SQL><![CDATA[select name from   sysibm.sysstogroup]]></SQL>
                   </Command>
                </Values>
             </Input>
    
             <SetVar name="zos_tablespace_using_clause2"
                value='(#zos_tablespace_using_name2 neq "") ? (#zos_tablespace_using_name2.equals("STOGROUP") ? " USING STOGROUP " +#zosstogroupname2 : " USING VCAT " +#zosvcatname2) : ""' />
    
             <Input label="PRIQTY" name="zos_tablespace_priqty_name2" style="list" editable="true"
                tip="In KB , -1 means automatic space allocation">
                <Default>Use Default</Default>
                <Values>Use Default|-1</Values>
             </Input>
             <SetVar name="zos_tablespace_priqty_clause2" value='#zos_tablespace_priqty_name2 neq "Use Default" ? " PRIQTY "+#zos_tablespace_priqty_name2 : ""' />
    
             <Input label="SECQTY" name="zos_tablespace_secqty_name2" style="list" editable="true"
                tip="In KB , -1 means automatic space allocation">
                <Default>Use Default</Default>
                <Values>Use Default|-1</Values>
             </Input>
             <SetVar name="zos_tablespace_secqty_clause2" value='#zos_tablespace_secqty_name2 neq "Use Default" ? " SECQTY "+#zos_tablespace_secqty_name2 : ""' />
    
             <Input label="Erase" name="zos_tablespace_erase_name2" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|NO|YES</Values>
             </Input>
             <SetVar name="zos_tablespace_erase_clause2"
                value='#zos_tablespace_erase_name2 neq "Use Default" ? " ERASE "+#zos_tablespace_erase_name2 : ""' />
   
             <Input label="Freepage" name="zos_tablespace_freepage_name2" style="list" editable="true">
                <Default>Use Default</Default>
                <Values>Use Default|0</Values>
             </Input>
             <SetVar name="zos_tablespace_freepage_clause2"
                value='#zos_tablespace_freepage_name2 neq "Use Default" ? " FREEPAGE "+#zos_tablespace_freepage_name2 : ""' />
    
             <Input label="PCTFREE" name="zos_tablespace_pctfree_name2" style="list" editable="true">
                <Default>Use Default</Default>
                <Values>Use Default|5</Values>
             </Input>
             <SetVar name="zos_tablespace_pctfree_clause2"
                value='#zos_tablespace_pctfree_name2 neq "Use Default" ? " PCTFREE "+#zos_tablespace_pctfree_name2 : ""' />
    
             <Input label="GBPCACHE" name="zos_tablespace_gbpcache_name2" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|CHANGED|SYSTEM|ALL|NONE</Values>
             </Input>
             <SetVar name="zos_tablespace_gbpcache_clause2"
                value='#zos_tablespace_gbpcache_name2 neq "Use Default" ? " GBPCACHE "+#zos_tablespace_gbpcache_name2 : ""' />
    
             <Input label="Compress" name="zos_tablespace_compress_name2" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|YES|NO</Values>
             </Input>
             <SetVar name="zos_tablespace_compress_clause2"
                value='#zos_tablespace_compress_name2 neq "Use Default" ? " COMPRESS "+#zos_tablespace_compress_name2 : ""' />
    
             <Input label="TRACKMOD" name="zos_tablespace_trackmod_name2" style="list" editable="false">
                <Default>Use Default</Default>
                <Values>Use Default|YES|NO</Values>
             </Input>
             <SetVar name="zos_tablespace_trackmod_clause2"
                value='#zos_tablespace_trackmod_name2 neq "Use Default" ? " TRACKMOD "+#zos_tablespace_trackmod_name2 : ""' />
          </Input>
          <SetVar name="zos_tablespace_partitions_parameters_clause"
             value='#zos_tablespace_partitions_parameters_name.equals("") ? "" : " ( "+#zos_tablespace_partitions_parameters_name+" ) "' />
    
          <Input label="Member Cluster" name="zos_tablespace_membercluster_name" style="check" editable="false">
             <Values>selected</Values>
          </Input>
          <SetVar name="zos_tablespace_member_cluster_clause" value='#zos_tablespace_membercluster_name.equals("selected") ? " Member Cluster " : ""' />
    
           <Input label="Bufferpool" name="zos_tablespace_bufferpool_name" style="list" editable="true">
              <Default>Use Default</Default>
              <Values>Use Default|BP0</Values>
           </Input>
           <SetVar name="zos_tablespace_bufferpool_clause" value='#zos_tablespace_bufferpool_name.equals("Use Default") ? "" : " BUFFERPOOL "+#zos_tablespace_bufferpool_name' />
           
           <Input label="Lock" style="label" linebreak="false"/>
           <Input label="Locksize" name="zos_tablespace_locksize_name" style="list" editable="false">
              <Default>Use Default</Default>
              <Values>Use Default|ANY|TABLESPACE|TABLE|PAGE|ROW</Values>
           </Input>
           <SetVar name="zos_tablespace_locksize_clause" value='#zos_tablespace_locksize_name.equals("Use Default") ? "" : " LOCKSIZE "+#zos_tablespace_locksize_name' />
     
           <Input label="Lockmax" name="zos_tablespace_lockmax_name" style="list" editable="true" linebreak="true">
              <Default>Use Default</Default>
              <Values>Use Default|SYSTEM|0</Values>
           </Input>
           <SetVar name="zos_tablespace_lockmax_clause" value='#zos_tablespace_lockmax_name.equals("Use Default") ? "" : " LOCKMAX "+#zos_tablespace_lockmax_name' />
    
           <Input label="Close"  name="zos_tablespace_close_name" style="radio" tip="Specifies the priority in which data sets are closed">
               <Values>DEF|YES|NO</Values>
               <Labels>Use Default|Yes|No</Labels>
               <Default>DEF</Default>
           </Input>
           <SetVar name="zos_tablespace_close_clause" value='#zos_tablespace_close_name.equals("DEF") ? "" : " CLOSE "+#zos_tablespace_close_name' />
     
          <Input label="CCSID" name="zos_tablespace_ccsid_name" style="list" editable="false">
              <Default>Use Default</Default>
              <Values>Use Default|EBCDIC|ASCII|UNICODE</Values>
           </Input>
           <SetVar name="zos_tablespace_ccsid_clause" value='#zos_tablespace_ccsid_name.equals("Use Default") ? "" : " CCSID "+#zos_tablespace_ccsid_name' />
     
           <Input label="MAXROWS" name="zos_tablespace_maxrows_name" style="list" editable="true" tip="Enter 0~255">
              <Default>Use Default</Default>
              <Values>Use Default</Values>
           </Input>
           <SetVar name="zos_tablespace_maxrows_clause" value='#zos_tablespace_maxrows_name.equals("Use Default") ? "" : " MAXROWS "+#zos_tablespace_maxrows_name' />
    
          <Input label="SEGSIZE" name="zos_tablespace_segsize_name" style="list" editable="false">
             <Default>4</Default>
             <Values>Use Default|4|8|12|16|20|24|28|32|36|40|44|48|52|56|60|64</Values>
          </Input>
          <SetVar name="zos_tablespace_segsize_clause"
             value='#zos_tablespace_segsize_name.equals("Use Default") ? "" : " SEGSIZE  "+#zos_tablespace_segsize_name' />
    
          <Command>
             <SQL><![CDATA[create  ${zos_tablespace_large_clause}
    
       tablespace  ${zos_tablespace_tablespace_name} IN ${zos_tablespace_database_name} ${zos_tablespace_using_clause} ${zos_tablespace_priqty_clause}  ${zos_tablespace_secqty_clause} ${zos_tablespace_erase_clause}  ${zos_tablespace_freepage_clause}  ${zos_tablespace_pctfree_clause}  ${zos_tablespace_gbpcache_clause}  ${zos_tablespace_define_clause}   ${zos_tablespace_logged_clause} ${zos_tablespace_compress_clause}  ${zos_tablespace_trackmod_clause} ${zos_tablespace_dssize_clause}   ${zos_tablespace_numparts_clause} ${zos_tablespace_partitions_parameters_clause}  ${zos_tablespace_member_cluster_clause} ${zos_tablespace_bufferpool_clause} ${zos_tablespace_locksize_clause} ${zos_tablespace_lockmax_clause} ${zos_tablespace_close_clause} ${zos_tablespace_ccsid_clause} ${zos_tablespace_maxrows_clause} ${zos_tablespace_segsize_clause}
       ]]>
             </SQL>
          </Command>
          <Confirm>
             Really create Universal tablespace - Partitioned-by-range ${zos_tablespace_tablespace_name} ?
          </Confirm>
          <Result>
             Tablespace ${zos_tablespace_tablespace_name} has been created!
          </Result>
       </Action>
    
       <Action id="db2zos-tablespace-create-universal-part-by-growth" label="Create Universal  partitioned-by-growth  Tablespace"
          reload="true" icon="add">
    
          <Input label="Large" name="zos_tablespace_large_name" style="check" editable="false"
             tip="if select this option the DSSIZE value will not included">
             <Default></Default>
             <Values>selected</Values>
          </Input>
    
          <SetVar name="zos_tablespace_large_clause"
             value='((#zos_tablespace_large_name eq "selected") and (#util.isDatabaseVersionLT(10))) ? " LARGE "  : ""' />
    
          <Input label="Tablespace Name" name="zos_tablespace_tablespace_name" style="text" editable="true" />
    
          <Input label="Database Name" name="zos_tablespace_database_name" style="list" editable="false">
             <Default>DSNDB04</Default>
             <Values>
                <Command>
                   <SQL>
                   <![CDATA[
                   select strip(name)
                   from   sysibm.sysdatabase
                   ]]>
                   </SQL>
                </Command>
             </Values>
          </Input>
    
          <Input label="VCAT/Storage Group"  name="zos_tablespace_using_name" style="radio">
              <Values>DEF|VCAT|STOGROUP</Values>
              <Labels>Use Default|VCAT|Storage Group</Labels>
              <Default>DEF</Default>
           </Input>
             
          <Input label=""  style="label" editable="false" linebreak="false"/>
 
          <Input label="VCAT Name" name="zosvcatname" style="text" editable="true"
              tip="Fill only if you selected VCAT option otherwise you can leave it blank.">
              <Default></Default>
          </Input>
          <Input label="Storage Group Name" name="zosstogroupname" style="list" editable="false" linebreak="true">
             <Default></Default>
             <Values>
                 <Command>
                    <SQL><![CDATA[select name from sysibm.sysstogroup]]></SQL>
                 </Command>
             </Values>
          </Input>
     
          <SetVar name="zos_tablespace_using_clause"
              value='(#zos_tablespace_using_name neq "DEF") ? (#zos_tablespace_using_name.equals("STOGROUP") ? " USING STOGROUP " +#zosstogroupname : " USING VCAT " +#zosvcatname) : ""' />
     
          <Input label="Space allocation" style="label" editable="true" linebreak="false"
              tip="Values In KB , -1 means automatic space allocation"/>
          <Input label="PRIQTY" name="zos_tablespace_priqty_name" style="text" editable="true"
              tip="In KB , -1 means automatic space allocation. Blank = Use default, PRIQTY parameter not included "/>
           
          <Input label="SECQTY" name="zos_tablespace_secqty_name" style="text" editable="true" linebreak="true"
              tip="In KB , -1 means automatic space allocation Blank = Use default, SECQTY parameter not included"/>
     
          <SetVar name="zos_tablespace_priqty_clause"
              value='#zos_tablespace_priqty_name neq "" ? " PRIQTY "+#zos_tablespace_priqty_name : ""' />
     
          <SetVar name="zos_tablespace_secqty_clause"
              value='#zos_tablespace_secqty_name neq "" ? " SECQTY "+#zos_tablespace_secqty_name : ""' />
    
          <Input label="Erase"  name="zos_tablespace_erase_name" style="radio">
               <Values>DEF|NO|YES</Values>
               <Labels>Use Default|No|Yes</Labels>
               <Default>DEF</Default>
          </Input>
     
          <SetVar name="zos_tablespace_erase_clause" value='#zos_tablespace_erase_name neq "DEF" ? " ERASE "+#zos_tablespace_erase_name : ""' />
    
          <Input label="Freepage" name="zos_tablespace_freepage_name" style="list" editable="true" >
             <Default>Use Default</Default>
             <Values>Use Default|0</Values>
          </Input>
          <SetVar name="zos_tablespace_freepage_clause"
              value='#zos_tablespace_freepage_name neq "Use Default" ? " FREEPAGE "+#zos_tablespace_freepage_name : ""' />
     
          <Input label="PCTFREE" name="zos_tablespace_pctfree_name" style="list" editable="true" tip="Percentage of each page to leave as free space when the table is loaded or reorganized">
              <Default>Use Default</Default>
              <Values>Use Default|5</Values>
          </Input>
          <SetVar name="zos_tablespace_pctfree_clause" value='#zos_tablespace_pctfree_name neq "Use Default" ? " PCTFREE "+#zos_tablespace_pctfree_name : ""' />
    
          <SetVar name="zos_tablespace_pctfree_clause" value='#zos_tablespace_pctfree_name neq "Use Default" ? " PCTFREE "+#zos_tablespace_pctfree_name : ""' />
     
          <Input label="GBP Cache"  name="zos_tablespace_gbpcache_name" style="radio">
             <Values>DEF|CHANGED|SYSTEM|ALL|NONE</Values>
             <Labels>Use Default|CHANGED|SYSTEM|ALL|NONE</Labels>
             <Default>DEF</Default>
            </Input>
          <SetVar name="zos_tablespace_gbpcache_clause" value='#zos_tablespace_gbpcache_name neq "DEF" ? " GBPCACHE "+#zos_tablespace_gbpcache_name : ""' />
    
          <Input label="Define"  name="zos_tablespace_define_name" style="radio">
               <Values>DEF|YES|NO</Values>
               <Labels>Use Default|Yes|No</Labels>
               <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_define_clause" value='#zos_tablespace_define_name neq "DEF" ? " DEFINE "+#zos_tablespace_define_name : ""' />
     
          <Input label="Logged"  name="zos_tablespace_logged_name" style="radio">
               <Values>DEF|LOGGED|NOT LOGGED</Values>
               <Labels>Use Default|Logged|Not Logged</Labels>
               <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_logged_clause"  value='#zos_tablespace_logged_name neq "DEF" ? "${zos_tablespace_logged_name}" : ""' />
     
          <Input label="Compress"  name="zos_tablespace_compress_name" style="radio">
               <Values>DEF|YES|NO</Values>
               <Labels>Use Default|Yes|No</Labels>
               <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_compress_clause" value='#zos_tablespace_compress_name neq "DEF" ? " COMPRESS "+#zos_tablespace_compress_name : ""' />
    
          <Input label="TRACKMOD"  name="zos_tablespace_trackmod_name" style="radio" tip="Track modified pages">
               <Values>DEF|YES|NO</Values>
               <Labels>Use Default|Yes|No</Labels>
               <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_trackmod_clause" value='#zos_tablespace_trackmod_name neq "DEF" ? " TRACKMOD "+#zos_tablespace_trackmod_name : ""' />
    
          <Input label="DSSIZE" name="zos_tablespace_dssize_name" style="list" editable="false">
             <Default></Default>
             <Values>1G|2G|4G|8G|16G|32G|64G|128G|256G</Values>
          </Input>
    
          <SetVar name="zos_tablespace_dssize_clause"
             value='#zos_tablespace_large_name.equals("selected") ? "" : " DSSIZE "+#zos_tablespace_dssize_name' />
    
          <Input label="MAXPARTITIONS" name="zos_tablespace_maxpartitions_name" style="number" editable="true">
             <Default>1</Default>
          </Input>
          <SetVar name="zos_tablespace_maxpartitions_clause" value='" MAXPARTITIONS  "+#zos_tablespace_maxpartitions_name' />
    
          <Input label="Member Cluster" name="zos_tablespace_membercluster_name" style="check" editable="false">
             <Values>selected</Values>
          </Input>
          <SetVar name="zos_tablespace_member_cluster_clause" value='#zos_tablespace_membercluster_name.equals("selected") ? " Member Cluster " : ""' />
    
          <Input label="Bufferpool" name="zos_tablespace_bufferpool_name" style="list" editable="true">
             <Default>Use Default</Default>
             <Values>Use Default|BP0</Values>
          </Input>
          <SetVar name="zos_tablespace_bufferpool_clause" value='#zos_tablespace_bufferpool_name.equals("Use Default") ? "" : " BUFFERPOOL "+#zos_tablespace_bufferpool_name' />
           
          <Input label="Lock" style="label" linebreak="false"/>
          <Input label="Locksize" name="zos_tablespace_locksize_name" style="list" editable="false">
             <Default>Use Default</Default>
             <Values>Use Default|ANY|TABLESPACE|TABLE|PAGE|ROW</Values>
          </Input>
          <SetVar name="zos_tablespace_locksize_clause" value='#zos_tablespace_locksize_name.equals("Use Default") ? "" : " LOCKSIZE "+#zos_tablespace_locksize_name' />
     
          <Input label="Lockmax" name="zos_tablespace_lockmax_name" style="list" editable="true" linebreak="true">
             <Default>Use Default</Default>
             <Values>Use Default|SYSTEM|0</Values>
          </Input>
          <SetVar name="zos_tablespace_lockmax_clause" value='#zos_tablespace_lockmax_name.equals("Use Default") ? "" : " LOCKMAX "+#zos_tablespace_lockmax_name' />
    
          <Input label="Close"  name="zos_tablespace_close_name" style="radio" tip="Specifies the priority in which data sets are closed">
               <Values>DEF|YES|NO</Values>
               <Labels>Use Default|Yes|No</Labels>
               <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_close_clause" value='#zos_tablespace_close_name.equals("DEF") ? "" : " CLOSE "+#zos_tablespace_close_name' />
     
          <Input label="CCSID" name="zos_tablespace_ccsid_name" style="list" editable="false">
             <Default>Use Default</Default>
             <Values>Use Default|EBCDIC|ASCII|UNICODE</Values>
          </Input>
          <SetVar name="zos_tablespace_ccsid_clause" value='#zos_tablespace_ccsid_name.equals("Use Default") ? "" : " CCSID "+#zos_tablespace_ccsid_name' />
     
          <Input label="MAXROWS" name="zos_tablespace_maxrows_name" style="list" editable="true" tip="Enter 0~255">
              <Default>Use Default</Default>
              <Values>Use Default</Values>
          </Input>
          <SetVar name="zos_tablespace_maxrows_clause" value='#zos_tablespace_maxrows_name.equals("Use Default") ? "" : " MAXROWS "+#zos_tablespace_maxrows_name' />
     
          <Input label="SEGSIZE" name="zos_tablespace_segsize_name" style="list" editable="false">
             <Default>4</Default>
             <Values>4|8|12|16|20|24|28|32|36|40|44|48|52|56|60|64</Values>
          </Input>
          
          <SetVar name="zos_tablespace_segsize_clause"
             value='#zos_tablespace_segsize_name.equals("Use Default") ? "" : " SEGSIZE  "+#zos_tablespace_segsize_name' />
    
          <Command>
             <SQL><![CDATA[create  ${zos_tablespace_large_clause} 
       tablespace  ${zos_tablespace_tablespace_name} IN ${zos_tablespace_database_name} ${zos_tablespace_using_clause} ${zos_tablespace_priqty_clause}  ${zos_tablespace_secqty_clause} ${zos_tablespace_erase_clause}  ${zos_tablespace_freepage_clause}  ${zos_tablespace_pctfree_clause}  ${zos_tablespace_gbpcache_clause}  ${zos_tablespace_define_clause}   ${zos_tablespace_logged_clause} ${zos_tablespace_compress_clause}  ${zos_tablespace_trackmod_clause} ${zos_tablespace_dssize_clause} ${zos_tablespace_maxpartitions_clause}  ${zos_tablespace_member_cluster_clause} ${zos_tablespace_bufferpool_clause} ${zos_tablespace_locksize_clause} ${zos_tablespace_lockmax_clause} ${zos_tablespace_close_clause} ${zos_tablespace_ccsid_clause} ${zos_tablespace_maxrows_clause} ${zos_tablespace_segsize_clause}
       ]]>
             </SQL>
          </Command>
          <Confirm>
             Really create Universal tablespace - Partitioned-by-growth ${zos_tablespace_tablespace_name} ?
          </Confirm>
          <Result>
             Tablespace ${zos_tablespace_tablespace_name} has been created!
          </Result>
       </Action>
    
       <Action id="db2zos-tablespace-create-lob" label="Create LOB Tablespace" reload="true" icon="add">
          <Input label="Tablespace Name" name="zos_tablespace_tablespace_name" style="text" editable="true" />
    
          <Input label="Database Name" name="zos_tablespace_database_name" style="list" editable="false">
             <Default>DSNDB04</Default>
             <Values>
                <Command>
                   <SQL>
                   <![CDATA[
                   select strip(name)
                   from   sysibm.sysdatabase
                   ]]>
                   </SQL>
                </Command>
             </Values>
          </Input>
    
            <Input label="VCAT/Storage Group"  name="zos_tablespace_using_name" style="radio">
               <Values>DEF|VCAT|STOGROUP</Values>
               <Labels>Use Default|VCAT|Storage Group</Labels>
               <Default>DEF</Default>
            </Input>
          <Input label=""  style="label" editable="false" linebreak="false"/>
          
          <Input label="VCAT Name" name="zosvcatname" style="text" editable="true"
             tip="Fill only if you selected VCAT option otherwise you can leave it blank."
          >
             <Default></Default>
          </Input>
          <Input label="Storage Group Name" name="zosstogroupname" style="list" editable="false" linebreak="true">
             <Default></Default>
             <Values>
                <Command>
                   <SQL><![CDATA[select name from   sysibm.sysstogroup]]></SQL>
                </Command>
             </Values>
          </Input>
    
          <SetVar name="zos_tablespace_using_clause"
             value='(#zos_tablespace_using_name neq "DEF") ? (#zos_tablespace_using_name.equals("STOGROUP") ? " USING STOGROUP " +#zosstogroupname : " USING VCAT " +#zosvcatname) : ""' />
    
         <Input label="Space allocation" style="label" editable="true" linebreak="false"
             tip="Values In KB , -1 means automatic space allocation"/>
 
          <Input label="PRIQTY" name="zos_tablespace_priqty_name" style="text" editable="true"
             tip="In KB , -1 means automatic space allocation. Blank = Use default, PRIQTY parameter not included "/>
          
          <Input label="SECQTY" name="zos_tablespace_secqty_name" style="text" editable="true" linebreak="true"
             tip="In KB , -1 means automatic space allocation Blank = Use default, SECQTY parameter not included"/>
    
          <SetVar name="zos_tablespace_priqty_clause"
             value='#zos_tablespace_priqty_name neq "" ? " PRIQTY "+#zos_tablespace_priqty_name : ""' />
    
          <SetVar name="zos_tablespace_secqty_clause"
             value='#zos_tablespace_secqty_name neq "" ? " SECQTY "+#zos_tablespace_secqty_name : ""' />
       
          <Input label="Erase"  name="zos_tablespace_erase_name" style="radio">
              <Values>DEF|NO|YES</Values>
              <Labels>Use Default|No|Yes</Labels>
              <Default>DEF</Default>
           </Input>
          <SetVar name="zos_tablespace_erase_clause" value='#zos_tablespace_erase_name neq "DEF" ? " ERASE "+#zos_tablespace_erase_name : ""' />
    
          <Input label="GBP Cache"  name="zos_tablespace_gbpcache_name" style="radio">
              <Values>DEF|CHANGED|SYSTEM|ALL|NONE</Values>
              <Labels>Use Default|CHANGED|SYSTEM|ALL|NONE</Labels>
              <Default>DEF</Default>
           </Input>
          <SetVar name="zos_tablespace_gbpcache_clause" value='#zos_tablespace_gbpcache_name neq "DEF" ? " GBPCACHE "+#zos_tablespace_gbpcache_name : ""' />
    
          <Input label="Define"  name="zos_tablespace_define_name" style="radio">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_define_clause" value='#zos_tablespace_define_name neq "DEF" ? " DEFINE "+#zos_tablespace_define_name : ""' />
    
         <Input label="Logged"  name="zos_tablespace_logged_name" style="radio">
              <Values>DEF|LOGGED|NOT LOGGED</Values>
              <Labels>Use Default|Logged|Not Logged</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_logged_clause"  value='#zos_tablespace_logged_name neq "DEF" ? "${zos_tablespace_logged_name}" : ""' />
    
          <Input label="DSSIZE" name="zos_tablespace_dssize_name" style="list" editable="false">
             <Default></Default>
             <Values>1G|2G|4G|8G|16G|32G|64G|128G|256G</Values>
          </Input>
    
          <SetVar name="zos_tablespace_dssize_clause"
             value='#zos_tablespace_dssize_name.equals("0") ? "" : " DSSIZE "+#zos_tablespace_dssize_name' />
    
          <Input label="Member Cluster" name="zos_tablespace_membercluster_name" style="check" editable="false">
             <Values>selected</Values>
          </Input>
          <SetVar name="zos_tablespace_member_cluster_clause" value='#zos_tablespace_membercluster_name.equals("selected") ? " Member Cluster " : ""' />
    
           <Input label="Bufferpool" name="zos_tablespace_bufferpool_name" style="list" editable="true">
             <Default>Use Default</Default>
             <Values>Use Default|BP0</Values>
          </Input>
          <SetVar name="zos_tablespace_bufferpool_clause" value='#zos_tablespace_bufferpool_name.equals("Use Default") ? "" : " BUFFERPOOL "+#zos_tablespace_bufferpool_name' />
          
          <Input label="Lock" style="label" linebreak="false"/>
          <Input label="Locksize" name="zos_tablespace_locksize_name" style="list" editable="false">
             <Default>Use Default</Default>
             <Values>Use Default|ANY|TABLESPACE|TABLE|PAGE|ROW</Values>
          </Input>
          <SetVar name="zos_tablespace_locksize_clause" value='#zos_tablespace_locksize_name.equals("Use Default") ? "" : " LOCKSIZE "+#zos_tablespace_locksize_name' />
    
          <Input label="Lockmax" name="zos_tablespace_lockmax_name" style="list" editable="true" linebreak="true">
             <Default>Use Default</Default>
             <Values>Use Default|SYSTEM|0</Values>
          </Input>
          <SetVar name="zos_tablespace_lockmax_clause" value='#zos_tablespace_lockmax_name.equals("Use Default") ? "" : " LOCKMAX "+#zos_tablespace_lockmax_name' />
             
          <Input label="Close"  name="zos_tablespace_close_name" style="radio" tip="Specifies the priority in which data sets are closed">
              <Values>DEF|YES|NO</Values>
              <Labels>Use Default|Yes|No</Labels>
              <Default>DEF</Default>
          </Input>
          <SetVar name="zos_tablespace_close_clause" value='#zos_tablespace_close_name.equals("DEF") ? "" : " CLOSE "+#zos_tablespace_close_name' />
    
          <Command>
             <SQL><![CDATA[create LOB 
       tablespace  ${zos_tablespace_tablespace_name} IN ${zos_tablespace_database_name} ${zos_tablespace_using_clause} ${zos_tablespace_priqty_clause}  ${zos_tablespace_secqty_clause} ${zos_tablespace_erase_clause}  ${zos_tablespace_gbpcache_clause} ${zos_tablespace_define_clause}   ${zos_tablespace_logged_clause} ${zos_tablespace_dssize_clause} ${zos_tablespace_member_cluster_clause} ${zos_tablespace_bufferpool_clause} ${zos_tablespace_locksize_clause} ${zos_tablespace_lockmax_clause} ${zos_tablespace_close_clause}
       ]]>
             </SQL>
          </Command>
          <Confirm>
             Really create LOB tablespace ${zos_tablespace_tablespace_name}?
          </Confirm>
          <Result>
             Tablespace ${zos_tablespace_tablespace_name} has been created!
          </Result>
       </Action>

       </ActionGroup>
   
      <ActionGroup type="Storagegroups">
      
         <Action id="db2zos-storagegroup-create" label="Create Storage Group" reload="true" icon="add">
      
            <Input label="StorageGroup Name" name="zos_storagegroup_storagegroup_name" style="text" editable="true"/>
      
            <Input name="zos_storagegroup_volume_serial_list_name" style="grid">
               <Arg name="output" value="${zos_storagegroup_volume_serial_name}"/>
               <Arg name="newline" value=", "/>
               <Input label="Volume Serial (Name)" name="zos_storagegroup_volume_serial_name" style="list" editable="true">
                  <Default></Default>
                  <Values>*</Values>
               </Input>
            </Input>
            <SetVar name="zos_storagegroup_volume_serial_clause" value='#zos_storagegroup_volume_serial_list_name.equals("") ? "" : " VOLUMES( "+#zos_storagegroup_volume_serial_list_name+" ) "'/>
      
            <Input label="Catalog Name(VCAT)" name="zos_storagegroup_VCAT_name" style="text" editable="true">
               <Default></Default>
            </Input>
            <SetVar name="zos_storagegroup_VCAT_clause" value='#zos_storagegroup_VCAT_name.equals("") ? "" :" VCAT  "+#zos_storagegroup_VCAT_name'/>
      
            <If test="#util.isDatabaseVersionGTE(9,1)">
               <Input label="Data Class" name="zos_storagegroup_dataclass_name" style="list" editable="true">
                  <Default>Use Default</Default>
                  <Values>Use Default</Values>
               </Input>
               <SetVar name="zos_storagegroup_dataclass_clause" value='#zos_storagegroup_dataclass_name.equals("Use Default") ? "" : " DATACLAS( "+#zos_storagegroup_dataclass_name+" )  "'/>
      
               <Input label="Managment Class" name="zos_storagegroup_managementclass_name" style="list" editable="true">
                  <Default>Use Default</Default>
                  <Values>Use Default</Values>
               </Input>
               <SetVar name="zos_storagegroup_managementclass_clause" value='#zos_storagegroup_managementclass_name.equals("Use Default") ? "" : " MGMTCLAS( "+#zos_storagegroup_managementclass_name+" ) "'/>
      
               <Input label="Storage Class" name="zos_storagegroup_storageclass_name" style="list" editable="true">
                  <Default>Use Default</Default>
                  <Values>Use Default</Values>
               </Input>
               <SetVar name="zos_storagegroup_storageclass_clause" value='#zos_storagegroup_storageclass_name.equals("Use Default") ? "" : " STORCLAS( "+#zos_storagegroup_storageclass_name+" ) "'/>
            </If>
            <Else>
               <SetVar name="zos_storagegroup_dataclass_clause" value=''/>
               <SetVar name="zos_storagegroup_managementclass_clause" value=''/>
               <SetVar name="zos_storagegroup_storageclass_clause" value=''/>
            </Else>
            <Command><SQL><![CDATA[CREATE STOGROUP ${zos_storagegroup_storagegroup_name} ${zos_storagegroup_volume_serial_clause} ${zos_storagegroup_VCAT_clause}  ${zos_storagegroup_dataclass_clause} ${zos_storagegroup_managementclass_clause} ${zos_storagegroup_storageclass_clause} ]]>
             </SQL></Command>
             <Confirm>
              Really create storagegroup  ${zos_storagegroup_storagegroup_name}?
             </Confirm>
             <Result>
              Storage Group  ${zos_storagegroup_storagegroup_name} has been created!
             </Result>
      </Action>
      
      </ActionGroup>
      
      <ActionGroup type="Storagegroup">
         <Action id="db2zos-storagegroup-alter" label="Alter Storage Group" reload="true" icon="add">
      
            <Input label="StorageGroup Name" name="zos_storagegroup_storagegroup_name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
      
            <Input label="Add Volumes" style="separator"/>
            <Input name="zos_storagegroup_add_volume_serial_list_name" style="grid">
               <Arg name="output" value="${zos_storagegroup_add_volume_serial_name}"/>
               <Arg name="newline" value=", "/>
               <Input label="Volume Serial (Name)" name="zos_storagegroup_add_volume_serial_name" style="list" editable="true">
                  <Default>*</Default>
                  <Values>*</Values>
               </Input>
            </Input>
            <SetVar name="zos_storagegroup_add_volume_serial_list_clause" value='#zos_storagegroup_add_volume_serial_list_name.equals("") ? "" : " ADD VOLUMES( "+#zos_storagegroup_add_volume_serial_list_name+" ) "'/>
      
            <Input label="Remove Volumes" style="separator"/>
            <Input name="zos_storagegroup_remove_volume_serial_list_name" style="grid">
               <Arg name="output" value="${zos_storagegroup_remove_volume_serial_name}"/>
               <Arg name="newline" value=", "/>
               <Input label="Volume Serial (Name)" name="zos_storagegroup_remove_volume_serial_name" style="list" editable="true">
                  <Default>*</Default>
                  <Values>
                     <Command>
                        <SQL><![CDATA[ select VOLID from sysibm.sysvolumes where SGNAME = '${objectname}' ]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
            </Input>
            <SetVar name="zos_storagegroup_remove_volume_serial_list_clause" value='#zos_storagegroup_remove_volume_serial_list_name.equals("") ? "" : " REMOVE VOLUMES( "+#zos_storagegroup_remove_volume_serial_list_name+" ) "'/>
      
            <Input label="Data Class" name="zos_storagegroup_dataclass_name" style="list" editable="true">
               <Default>Use Default</Default>
               <Values>Use Default</Values>
            </Input>
            <SetVar name="zos_storagegroup_dataclass_clause" value='#zos_storagegroup_dataclass_name.equals("Use Default") ? "" : " DATACLAS( "+#zos_storagegroup_dataclass_name+" )  "'/>
      
            <Input label="Managment Class" name="zos_storagegroup_managementclass_name" style="list" editable="true">
               <Default>Use Default</Default>
               <Values>Use Default</Values>
            </Input>
            <SetVar name="zos_storagegroup_managementclass_clause" value='#zos_storagegroup_managementclass_name.equals("Use Default") ? "" : " MGMTCLAS( "+#zos_storagegroup_managementclass_name+" ) "'/>
      
            <Input label="Storage Class" name="zos_storagegroup_storageclass_name" style="list" editable="true">
               <Default>Use Default</Default>
               <Values>Use Default</Values>
            </Input>
            <SetVar name="zos_storagegroup_storageclass_clause" value='#zos_storagegroup_storageclass_name.equals("Use Default") ? "" : " STORCLAS( "+#zos_storagegroup_storageclass_name+" ) "'/>
      
            <Command><SQL><![CDATA[ALTER STOGROUP ${zos_storagegroup_storagegroup_name} ${zos_storagegroup_add_volume_serial_list_clause} ${zos_storagegroup_remove_volume_serial_list_clause}  ${zos_storagegroup_dataclass_clause} ${zos_storagegroup_managementclass_clause} ${zos_storagegroup_storageclass_clause} ]]>
             </SQL></Command>
             <Confirm>
              Really alter storagegroup  ${zos_storagegroup_storagegroup_name}?
             </Confirm>
             <Result>
              Storage Group  ${zos_storagegroup_storagegroup_name} has been altered!
             </Result>
      </Action>
      
       <Action id="db2zos-storagegroup-drop" label="Drop Storage Group" reload="true" icon="remove">
            <Input label="Storage Group Name" name="zos_storagegroup_name" style="text"  editable="false">
              <Default>${objectname}</Default>
            </Input>
         <Command><SQL><![CDATA[drop stogroup "${zos_storagegroup_name}"]]></SQL></Command>
         <Confirm>
            Really drop storage group ${zos_storagegroup_name} ?
         </Confirm>
         <Result>
            Storage Group ${zos_storagegroup_name} dropped !
         </Result>
         </Action>
      
      </ActionGroup>

          <ActionGroup type="Databases">
      
         <Action id="db2zos-database-create" label="Create Database" reload="true" resetcatalogs="true" icon="add">
      
            <Input label="Database Name" name="zos_database_database_name" style="text" editable="true"/>
      
            <Input label="Bufferpool" name="zos_database_bufferpool_name" style="list" editable="true">
               <Default>Use Default</Default>
               <Values>Use Default|BP0</Values>
            </Input>
            <SetVar name="zos_database_bufferpool_clause" value='#zos_database_bufferpool_name.equals("Use Default") ? "" : " BUFFERPOOL "+#zos_database_bufferpool_name+" "'/>
      
            <Input label="Index Bufferpool" name="zos_database_indexbufferpool_name" style="list" editable="true">
               <Default>Use Default</Default>
               <Values>Use Default|BP0</Values>
            </Input>
            <SetVar name="zos_database_indexbufferpool_clause" value='#zos_database_indexbufferpool_name.equals("Use Default") ? "" : " INDEXBP "+#zos_database_indexbufferpool_name+" "'/>
      
            <Input name="zos_database_sep1" style="separator"/>
      
             <Input label="As WorkFile" name="zos_database_asworkfile_name" style="check"   editable="false">
              <Default></Default>
              <Values>selected</Values>
             </Input>
      
           <!-- TODO list ? -->
            <Input label="Member Name" name="zos_database_membername_name" style="list" editable="true">
               <Default>Use Default</Default>
               <Values>Use Default</Values>
            </Input>
      
            <Input name="zos_database_sep2" style="separator"/>
      
            <SetVar name="zos_database_membername_clause" value='((#zos_database_membername_name.equals("Use Default"))  or (#zos_database_membername_name.equals(""))) ? "" :  #zos_database_membername_name'/>
      
            <SetVar name="zos_database_asworkfile_clause" value='((#zos_database_asworkfile_name  eq "selected") ? ((#zos_database_membername_clause eq "") ? " AS WORKFILE " : (" AS WORKFILE FOR "+#zos_database_membername_clause)) : "")'/>
      
            <Input label="Stogroup" name="zos_database_stogroup_name" style="list" editable="true">
               <Default>Use Default</Default>
               <Values>Use Default|
                 <Command idref="db2zos.getStorageGroups">
                   </Command>
               </Values>
            </Input>
            <SetVar name="zos_database_stogroup_clause" value='#zos_database_stogroup_name.equals("Use Default") ? "" : " STOGROUP "+#zos_database_stogroup_name+" "'/>
      
             <!-- TODO radio -->
             
             <Input label="CCSID" name="zos_database_ccsid_name" style="list" editable="false">
               <Default>Use Default</Default>
              <Values>Use Default|EBCDIC|ASCII|UNICODE</Values>
             </Input>
             <SetVar name="zos_database_ccsid_clause" value='((#zos_database_ccsid_name.equals("Use Default")) or (#zos_database_asworkfile_clause neq "")) ? "" : " CCSID "+#zos_database_ccsid_name'/>
      
            <Command><SQL><![CDATA[CREATE DATABASE ${zos_database_database_name} ${zos_database_bufferpool_clause} ${zos_database_indexbufferpool_clause}  ${zos_database_asworkfile_clause} ${zos_database_stogroup_clause} ${zos_database_ccsid_clause} ]]>
             </SQL></Command>
             <Confirm>
              Really create database ${zos_database_database_name}?
             </Confirm>
             <Result>
              Database ${zos_database_database_name} has been created !
             </Result>
        </Action>
      </ActionGroup>
      
      <ActionGroup type="Database">
         <Action id="db2zos-database-drop" label="Drop Database" reload="true" resetcatalogs="true" icon="remove">
            <Input label="Database Name" name="zos_database_name" style="text"  editable="false">
              <Default>${objectname}</Default>
            </Input>
         <Command><SQL><![CDATA[drop database "${zos_database_name}"]]></SQL></Command>
         <Confirm>
            Really drop database ${zos_database_name} ?
         </Confirm>
         <Result>
            Database ${zos_database_name} dropped !
         </Result>
         </Action>
      
         <Action id="db2zos-database-alter" label="Alter Database" reload="true" icon="add">
      
            <Input label="Database Name" name="zos_database_database_name" style="text"  editable="false">
              <Default>${objectname}</Default>
            </Input>
      
            <Input label="Bufferpool" name="zos_database_bufferpool_name" style="list" editable="true">
               <Default>
                <Command idref="db2zos.Database-getcolumnvalue1">
                  <Input name="objectname" value="${objectname}"/>
                  <Input name="columnname" value="BPOOL"/>
                  </Command>
               </Default>
               <Values>Do not change defined value|
                <Command idref="db2zos.Database-getcolumnvalue2">
                  <Input name="columnname" value="BPOOL"/>
                  </Command>
               </Values>
            </Input>
            <SetVar name="zos_database_bufferpool_clause" value='#zos_database_bufferpool_name.equals("Do not change defined value") ? "" : " BUFFERPOOL "+#zos_database_bufferpool_name+" "'/>
      
            <Input label="Index Bufferpool" name="zos_database_indexbufferpool_name" style="list" editable="true">
               <Default>          
                <Command idref="db2zos.Database-getcolumnvalue1">
                  <Input name="objectname" value="${objectname}"/>
                  <Input name="columnname" value="INDEXBP"/>
                  </Command>
               </Default>
               <Values>Do not change defined value|
                <Command idref="db2zos.Database-getcolumnvalue2">
                  <Input name="columnname" value="INDEXBP"/>
                  </Command></Values>
            </Input>
            <SetVar name="zos_database_indexbufferpool_clause" value='#zos_database_indexbufferpool_name.equals("Do not change defined value") ? "" : " INDEXBP "+#zos_database_indexbufferpool_name+" "'/>
      
            <Input label="Stogroup" name="zos_database_stogroup_name" style="list" editable="true">
               <Default>
                <Command idref="db2zos.Database-getcolumnvalue1">
                  <Input name="objectname" value="${objectname}"/>
                  <Input name="columnname" value="STGROUP"/>
                  </Command>
                </Default>
               <Values>Do not change defined value|
                 <Command idref="db2zos.getStorageGroups">
                   </Command>
               </Values>
            </Input>
            <SetVar name="zos_database_stogroup_clause" value='#zos_database_stogroup_name.equals("Do not change defined value") ? "" : " STOGROUP "+#zos_database_stogroup_name+" "'/>
      
             <Input label="TABLE Encoding" name="zos_database_encoding_name" style="text" editable="false">
              <Default>        
                 <Command idref="db2zos.Database-getcolumnvalue1">
                  <Input name="objectname" value="${objectname}"/>
                  <Input name="columnname" value="ENCODING_SCHEME"/>
                  </Command>
              </Default>
             </Input>
      
             <Input label="SBCS-CCSID" name="zos_database_sbcsccsid_name" style="text" editable="false">
              <Default>        
                 <Command idref="db2zos.Database-getcolumnvalue1">
                  <Input name="objectname" value="${objectname}"/>
                  <Input name="columnname" value="SBCS_CCSID"/>
                  </Command>
              </Default>
             </Input>
      
             <Input label="DBCS-CCSID" name="zos_database_dbcsccsid_name" style="text" editable="false">
              <Default>        
                 <Command idref="db2zos.Database-getcolumnvalue1">
                  <Input name="objectname" value="${objectname}"/>
                  <Input name="columnname" value="DBCS_CCSID"/>
                  </Command>
              </Default>
             </Input>
      
             <Input label="MIXED-CCSID" name="zos_database_mixedccsid_name" style="text" editable="false">
              <Default>        
                 <Command idref="db2zos.Database-getcolumnvalue1">
                  <Input name="objectname" value="${objectname}"/>
                  <Input name="columnname" value="MIXED_CCSID"/>
                  </Command>
              </Default>
             </Input>
      
             <Input label="CCSID" name="zos_database_ccsid_name" style="list" editable="true">
              <Default>Do not change defined value</Default>
              <Values>Do not change defined value|37|273|277|278|280|284|285|297|500|871|850|874|1250|1251|1252|1253|1254|1255|1256|1257|1208
              </Values>
             </Input>
      
             <SetVar name="zos_database_ccsid_clause" value='#zos_database_ccsid_name.equals("Do not change defined value") ? "" : " CCSID "+#zos_database_ccsid_name'/>
      
            <Command><SQL><![CDATA[ALTER DATABASE ${zos_database_database_name} ${zos_database_bufferpool_clause} ${zos_database_indexbufferpool_clause}   ${zos_database_stogroup_clause} ${zos_database_ccsid_clause} ]]>
             </SQL></Command>
              <Confirm>
               Really alter database ${zos_database_database_name}?
              </Confirm>
              <Result>
               Database ${zos_database_database_name} has been altered !
              </Result>
        </Action>
      
      </ActionGroup>
    
   </ObjectsActionDef>

   <!-- =================================================================== -->
   <!-- Definition of the database objects tree structure -->
   <!-- This definition do not list catalogs as these are not supported -->
   <!-- by DB2 on z/OS. -->
   <!-- =================================================================== -->

   <ObjectsTreeDef extends="false">
      <GroupNode type="Schemas" label="Schemas">
         <DataNode type="Schema" label="${db2zos.getSchemas.SCHEMA}">
            <SetVar name="schema" value="${db2zos.getSchemas.SCHEMA}"/>
            <Command idref="db2zos.getSchemas">
               <Filter index="1" label="Name"/>
            </Command>

            <GroupNode type="Tables" label="Tables">
               <DataNode type="Table" label="${getTables.TABLE_NAME}">
                  <SetVar name="objectname" value="${getTables.TABLE_NAME}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="getTables">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                     <Input name="tableType" value="TABLE,SYSTEM TABLE"/>
                  </Command>

                  <!-- Need to keep the objectname for the current table in
                       a new variable so that the viewers will be able to pick up
                       the correct input to display -->
                  <SetVar name="theTableName" value="${objectname}"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumnDefinitions.COLUMN_NAME}"
                               label1="${getColumnDefinitions.TYPE_NAME}"
                               isLeaf="true"
                               icon="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'PrimaryKey' : 'Column'"
                               tip="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'This is a primary key column' : ''">
                        <SetVar name="objectname" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <Command idref="getColumnDefinitions">
                           <Input name="catalog" value="${catalog}"/>
                           <Input name="objectname" value="${theTableName}"/>
                           <Input name="tableType" value="Table"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>
                     </DataNode>
                  </GroupNode>

                  <GroupNode type="TableIndexes" label="Indexes">
                     <DataNode type="Index" label="${db2zos.getIndexesTable.CREATOR}.${db2zos.getIndexesTable.NAME}"
                               isLeaf="true">
                        <SetVar name="objectname" value="${db2zos.getIndexesTable.NAME}"/>
                        <SetVar name="indexCreator" value="${db2zos.getIndexesTable.CREATOR}"/>
                        <Command idref="db2zos.getIndexesTable">
                           <Input name="tableCreator" value="${schema}"/>
                           <Input name="tableName" value="${theTableName}"/>
                           <Input name="xtraCond" value="and UNIQUERULE NOT IN ('P','C', 'G')"/>
                           <Filter index="TBNAME" label="Table Name"/>
                        </Command>
                     </DataNode>
                  </GroupNode>
                  
                  <GroupNode type="Triggers" label="Triggers">
                     <DataNode type="Trigger" label="${db2zos.getTriggers.SCHEMA}.${db2zos.getTriggers.NAME}" isLeaf="true">
                        <SetVar name="objectname" value="${db2zos.getTriggers.NAME}"/>
                        <SetVar name="objectSchema" value="${db2zos.getTriggers.SCHEMA}"/>
                        <SetVar name="objectRemarks" value="${db2zos.getTriggers.REMARKS}"/>
                        
                        <Command idref="db2zos.getTriggers">
                           <Input name="tbowner" value="${schema}"/>
                           <Input name="table" value="${theTableName}"/>
                           <Input name="triggerSchema" value="%"/>
                        </Command>
                     </DataNode>
                  </GroupNode>

               </DataNode>
            </GroupNode>

            <!-- Reset the temporary variable so that the following DataNodes
                 operates properly -->
            <SetVar name="theTableName" value="%"/>
 
            <GroupNode type="Views" label="Views">
               <DataNode type="View" label="${db2zos.getViews.NAME}">
                  <SetVar name="objectname" value="${db2zos.getViews.NAME}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="db2zos.getViews">
                     <Input name="owner" value="${schema}"/>
                     <Input name="view" value="%"/>
                     <Input name="type" value="V"/>
                  </Command>
                  
                  <!-- Need to keep the objectname for the current table in
                       a new variable so that the viewers will be able to pick up
                       the correct input to display -->
                  <SetVar name="theTableName" value="${objectname}"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumnDefinitions.COLUMN_NAME}"
                               label1="${getColumnDefinitions.TYPE_NAME}"
                               isLeaf="true"
                               icon="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'PrimaryKey' : 'Column'"
                               tip="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'This is a primary key column' : ''">
                        <SetVar name="objectname" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <Command idref="getColumnDefinitions">
                           <Input name="catalog" value="${catalog}"/>
                           <Input name="objectname" value="${theTableName}"/>
                           <Input name="tableType" value="View"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>
                     </DataNode>
                  </GroupNode>
               </DataNode>
            </GroupNode>
 
           <GroupNode type="TemporaryTables" label="Temporary Tables">
               <DataNode type="TempTable" label="${db2zos.getTables.NAME}" isLeaf="true">
                  <SetVar name="objectname" value="${db2zos.getTables.NAME}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="db2zos.getTables">
                     <Input name="owner" value="${schema}"/>
                     <Input name="table" value="%"/>
                     <Input name="type" value="G"/>
                  </Command>
               </DataNode>
            </GroupNode>
            
            <GroupNode type="Aliases" label="Aliases">
               <DataNode type="Alias" label="${db2zos.getTables.NAME}" label1="${db2zos.getTables.TBCREATOR}.${db2zos.getTables.TBNAME}" isLeaf="true">
                  <SetVar name="objectname" value="${db2zos.getTables.NAME}"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="db2zos.getTables">
                     <Input name="owner" value="${schema}"/>
                     <Input name="table" value="%"/>
                     <Input name="type" value="A"/>
                  </Command>
               </DataNode>
            </GroupNode>

           <GroupNode type="Synonyms" label="Synonyms">
              <DataNode type="Synonym" label="${db2zos.getSynonyms.NAME}"  isLeaf="true">
                <SetVar name="objectname" value="${db2zos.getSynonyms.NAME}"/>
                <SetVar name="acceptInQB" value="true"/>
                <Command idref="db2zos.getSynonyms">
                   <Input name="owner" value="${schema}"/>
                </Command>
             </DataNode>
          </GroupNode>


            <GroupNode type="Indexes" label="Indexes">
               <DataNode type="Index" label="${db2zos.getIndexesAll.CREATOR}.${db2zos.getIndexesAll.NAME}"
                         label1="${db2zos.getIndexesAll.TBCREATOR}.${db2zos.getIndexesAll.TBNAME}"
                         isLeaf="true">
                  <SetVar name="objectname" value="${db2zos.getIndexesAll.NAME}"/>
                  <SetVar name="indexCreator" value="${db2zos.getIndexesAll.CREATOR}"/>
                  
                  <Command idref="db2zos.getIndexesAll">
                     <Input name="tableCreator" value="${schema}"/>
                     <Input name="indexCreator" value="${schema}"/>
                     <Input name="xtraCond" value="and UNIQUERULE NOT IN ('P','C', 'G')"/>
                     <Filter index="TBNAME" label="Table Name"/>
                  </Command>
               </DataNode>
            </GroupNode>
            
            <GroupNode type="Sequences" label="Sequences">
               <DataNode type="Sequence" label="${db2zos.getSequences.NAME}" isLeaf="true">
                  <SetVar name="objectname" value="${db2zos.getSequences.NAME}"/>
                  <Command idref="db2zos.getSequences">
                     <Input name="owner" value="${schema}"/>
                  </Command>
               </DataNode>
            </GroupNode>
            <!--
                        <GroupNode type="SystemTables" label="System Tables" isLeaf="true"/>
            -->
            <GroupNode type="MaterializedQueryTables" label="Materialized Query Tables">
               <DataNode type="MaterializedQueryTable" label="${getTables.TABLE_NAME}" isLeaf="true">
                  <SetVar name="objectname" value="${getTables.TABLE_NAME}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="getTables">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                     <Input name="tableType" value="MATERIALIZED QUERY TABLE"/>
                  </Command>
               </DataNode>
            </GroupNode>

            <GroupNode type="Functions" label="Functions">
               <DataNode type="Function" label="${db2zos.getFunctions.NAME} (${db2zos.getFunctions.SPECIFICNAME})" isLeaf="true">
                  <SetVar name="objectname" value="${db2zos.getFunctions.NAME}"/>
                  <Command idref="db2zos.getFunctions">
                     <Input name="owner" value="${schema}"/>
                  </Command>
               </DataNode>
            </GroupNode>

            <GroupNode type="Procedures" label="Stored Procedures">
               <DataNode type="Procedure" label="${db2zos.getProcedures.NAME}" isLeaf="true">
                  <SetVar name="objectname" value="${db2zos.getProcedures.NAME}"/>
                  <Command idref="db2zos.getProcedures">
                     <Input name="owner" value="${schema}"/>
                  </Command>
               </DataNode>
            </GroupNode>

            <GroupNode type="Packages" label="Packages">
               <DataNode type="Package" label="${db2zos.getPackages.NAME}" isLeaf="true">
                  <SetVar name="objectname" value="${db2zos.getPackages.NAME}"/>
                  <Command idref="db2zos.getPackages">
                     <Input name="owner" value="${schema}"/>
                  </Command>
               </DataNode>
            </GroupNode>

            <GroupNode type="Triggers" label="Triggers">
               <DataNode type="Trigger" label="${db2zos.getTriggersAll.SCHEMA}.${db2zos.getTriggersAll.NAME}" 
                       label1="${db2zos.getTriggersAll.TBOWNER}.${db2zos.getTriggersAll.TBNAME}"
                       isLeaf="true">
                  <SetVar name="objectname" value="${db2zos.getTriggersAll.NAME}"/>
                  <SetVar name="objectSchema" value="${db2zos.getTriggersAll.SCHEMA}"/>
                  <SetVar name="objectRemarks" value="${db2zos.getTriggersAll.REMARKS}"/>
                  
                  <Command idref="db2zos.getTriggersAll">
                     <Input name="tbowner" value="${schema}"/>
                     <Input name="triggerSchema" value="${schema}"/>
                  </Command>
               </DataNode>
            </GroupNode>
         </DataNode>
      </GroupNode>

      <GroupNode type="DBA" label="DBA Views">
         <GroupNode type="Users" label="Authorizations" isLeaf="false">
          
           <DataNode type="User" label="${db2zos.getGrantees.GRANTEE}" isLeaf="true">
             <SetVar name="objectname" value="${db2zos.getGrantees.GRANTEE}"/>
             <Command idref="db2zos.getGrantees">
                <Input name="granteetype" value=" "/>
                <Input name="grantee" value="%"/>
             </Command>
          </DataNode>
          
         </GroupNode>
       
         <GroupNode type="Roles" label="Roles">
            <DataNode type="Role" label="${db2zos.getRoles.name}" isLeaf="true">
               <SetVar name="objectname" value="${db2zos.getRoles.name}"/>
               <Command idref="db2zos.getRoles">
               </Command>
            </DataNode>
        </GroupNode>
       
        <GroupNode type="Tablespaces" label="Table Spaces">
          <DataNode type="Tablespace" label="${db2zos.getTableSpaces.NAME}" isLeaf="true">
             <SetVar name="objectname" value="${db2zos.getTableSpaces.NAME}"/>
             <Command idref="db2zos.getTableSpaces">
             </Command>
          </DataNode>
       </GroupNode>
       
       <GroupNode type="Databases" label="Databases">
          <DataNode type="Database" label="${db2zos.getDatabases.NAME}" isLeaf="true">
            <SetVar name="objectname" value="${db2zos.getDatabases.NAME}"/>
            <Command idref="db2zos.getDatabases">
            </Command>
          </DataNode>
       </GroupNode>
       
       <GroupNode type="Storagegroups" label="Storage Groups">
          <DataNode type="Storagegroup" label="${db2zos.getStorageGroups.NAME}" isLeaf="true">
            <SetVar name="objectname" value="${db2zos.getStorageGroups.NAME}"/>
            <Command idref="db2zos.getStorageGroups">
            </Command>
          </DataNode>
       </GroupNode>
     </GroupNode>
      
      

   </ObjectsTreeDef>

   <!-- =================================================================== -->
   <!-- Definition of the database objects views -->
   <!-- =================================================================== -->

   <ObjectsViewDef extends="true">

      <ObjectView type="Schemas">
         <DataView id="generic-schemas-schemas" drop-on-condition="always"/>

         <DataView id="db2zos-schemas-schemas" icon="Schemas" label="Schemas" viewer="grid">
            <Command idref="db2zos.getSchemas"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Schema" drop-on-condition="always"/>

      <ObjectView type="Tables">
         <DataView id="generic-tables-tables" drop-on-condition="always"/>
         <DataView id="generic-tables-references" drop-on-condition="always"/>

         <DataView id="db2zos-tables-tables" icon="Tables" label="Tables" viewer="grid">
            <Input name="menuItem" value="Open in New Tab...">
               <Input name="action" value="open-object-in-new-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Open in Floating Tab...">
               <Input name="action" value="open-object-in-floating-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: DROP TABLE">
               <Input name="command" value="drop table ${schema||CREATOR}${object||NAME}"/>
            </Input>

            <Command idref="db2zos.getTables">
               <Input name="owner" value="${schema}"/>
               <Input name="table" value="%"/>
               <Input name="type" value="T"/>
            </Command>
         </DataView>
         <DataView id="db2zos-tables-references" icon="References" label="References" viewer="tables-refs">
            <Command idref="getTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
               <Input name="tableType" value="TABLE,SYSTEM TABLE"/>
            </Command>
         </DataView>

      </ObjectView>

      <ObjectView type="Table">
         <DataView id="generic-table-info" drop-on-condition="always"/>
         <DataView id="generic-table-indexes" label="Indexes Columns" order-after="5"/>

         <DataView id="db2zos-table-info" icon="Info" label="Info" viewer="form" order-before="0">
            <Command idref="db2zos.getTables">
               <Input name="owner" value="${schema}"/>
               <Input name="table" value="${objectname}"/>
               <Input name="type" value="T"/>
            </Command>
         </DataView>

         <DataView id="db2zos-table-indexes" icon="Index" label="Indexes" viewer="grid" order-after="5">
            <Command idref="db2zos.getIndexesTable">
               <Input name="tableCreator" value="${schema}"/>
               <Input name="tableName" value="${objectname}"/>
               <Input name="xtraCond" value=""/>
            </Command>
         </DataView>

         <DataView id="db2zos-table-triggers" icon="Trigger" label="Triggers" viewer="form">
            <Command idref="db2zos.getTriggers">
               <Input name="tbowner" value="${schema}"/>
               <Input name="table" value="${theTableName}"/>
               <Input name="triggerSchema" value="%"/>  <!-- TODO: ${schema} here if we decide to show only triggers on for this schema -->
            </Command>
         </DataView>
         
          <DataView id="db2-table-constraints" icon="Constraints" label="Constraints" viewer="grid">
            <Command idref="db2zos.getTableConstraints">
               <Input name="tbowner" value="${schema}"/>
               <Input name="table" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Views">
         <DataView id="db2zos-views-views" icon="Views" label="Views" viewer="grid">
            <Input name="menuItem" value="Open in New Tab...">
               <Input name="action" value="open-object-in-new-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Open in Floating Tab...">
               <Input name="action" value="open-object-in-floating-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: DROP VIEW">
               <Input name="command" value="drop view ${schema||CREATOR}${object||NAME}"/>
            </Input>

            <Command idref="db2zos.getViews">
               <Input name="owner" value="${schema}"/>
               <Input name="view" value="%"/>
               <Input name="type" value="V"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="View">
         <DataView id="db2zos-view-info" icon="Info" label="Info" viewer="form">
            <Command idref="db2zos.getViews">
               <Input name="owner" value="${schema}"/>
               <Input name="view" value="${objectname}"/>
               <Input name="type" value="V"/>
            </Command>
         </DataView>
         <DataView id="db2zos-view-columns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="db2zos.getColumns">
               <Input name="owner" value="${schema}"/>
               <Input name="table" value="${objectname}"/>
            </Command>
         </DataView>
         <DataView id="db2zos-view-data" icon="Data" label="Data" viewer="table-data" doclink="/doclink/table-data"/>
         <DataView id="db2zos-view-rowcount" icon="RowCount" label="Row Count" viewer="table-rowcount"/>
         <DataView id="db2zos-view-indexes" icon="Index" label="Indexes" viewer="grid">
            <Command idref="db2zos.getIndexesTable">
               <Input name="tableCreator" value="${schema}"/>
               <Input name="tableName" value="${objectname}"/>
               <Input name="xtraCond" value="and UNIQUERULE NOT IN ('P','C', 'G')"/>
            </Command>
         </DataView>
         <DataView id="db2zos-view-source" icon="Source" label="Source" viewer="text">
            <Input name="formatSQL" value="true"/>

            <Command idref="db2zos.getViewSource">
               <Input name="owner" value="${schema}"/>
               <Input name="view" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>
      
      <ObjectView type="TemporaryTables">
         <DataView id="db2zos-temporarytables-temporarytables" icon="TemporaryTables" label="Temporary Tables" viewer="grid">
            <Command idref="db2zos.getTables">
               <Input name="owner" value="${schema}"/>
               <Input name="table" value="%"/>
               <Input name="type" value="G"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="TempTable">
         <DataView id="db2zos-temporarytable-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="db2zos-temporarytable-columns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="db2zos.getColumns">
               <Input name="owner" value="${db2zos.getTables.CREATOR}"/>
               <Input name="table" value="${db2zos.getTables.NAME}"/>
            </Command>
         </DataView>
      </ObjectView>
      

      <ObjectView type="Aliases">
         <DataView id="db2zos-aliases-aliases" icon="Aliases" label="Aliases" viewer="grid">
            <Command idref="db2zos.getTables">
               <Input name="owner" value="${schema}"/>
               <Input name="table" value="%"/>
               <Input name="type" value="A"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Alias">
         <DataView id="db2zos-alias-info" icon="Info" label="Info" viewer="form">
            <Command idref="db2zos.getTables">
               <Input name="owner" value="${schema}"/>
               <Input name="table" value="${objectname}"/>
               <Input name="type" value="A"/>
            </Command>
         </DataView>
         <DataView id="db2zos-alias-columns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="db2zos.getColumns">
               <Input name="owner" value="${db2zos.getTables.TBCREATOR}"/>
               <Input name="table" value="${db2zos.getTables.TBNAME}"/>
            </Command>
         </DataView>
         <DataView id="db2zos-alias-data" icon="Data" label="Data" viewer="table-data" doclink="/doclink/table-data"/>
         <DataView id="db2zos-alias-rowcount" icon="RowCount" label="Row Count" viewer="table-rowcount"/>
      </ObjectView>
      
      <ObjectView type="Synonyms">
         <DataView id="db2zos-synonyms-synonyms" icon="Aliases" label="Synonyms" viewer="grid">
            <Command idref="db2zos.getSynonyms">
               <Input name="owner" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Synonym">
         <DataView id="db2zos-synonym-info" icon="Info" label="Info" viewer="form">
            <Command idref="db2zos.getSynonymInfo">
               <Input name="owner" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>
      

      <ObjectView type="MaterializedQueryTables">
         <DataView id="db2zos-materializedquerytables-materializedquerytables" icon="MaterializedQueryTables" label="Materialized Query Tables" viewer="grid">
            <Input name="menuItem" value="Open in New Tab...">
               <Input name="action" value="open-object-in-new-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Open in Floating Tab...">
               <Input name="action" value="open-object-in-floating-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: DROP VIEW">
               <Input name="command" value="drop view ${schema||CREATOR}${object||NAME}"/>
            </Input>

            <Command idref="db2zos.getViews">
               <Input name="owner" value="${schema}"/>
               <Input name="view" value="%"/>
               <Input name="type" value="S"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="MaterializedQueryTable">
         <DataView id="db2zos-materializedquerytable-info" icon="Info" label="Info" viewer="form">
            <Command idref="db2zos.getViews">
               <Input name="owner" value="${schema}"/>
               <Input name="view" value="${objectname}"/>
               <Input name="type" value="S"/>
            </Command>
         </DataView>
         <DataView id="db2zos-materializedquerytable-columns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="db2zos.getColumns">
               <Input name="owner" value="${schema}"/>
               <Input name="table" value="${objectname}"/>
            </Command>
         </DataView>
         <DataView id="db2zos-materializedquerytable-data" icon="Data" label="Data" viewer="table-data" doclink="/doclink/table-data"/>
         <DataView id="db2zos-materializedquerytable-rowcount" icon="RowCount" label="Row Count" viewer="table-rowcount"/>
         <DataView id="db2zos-materializedquerytable-indexes" icon="Index" label="Indexes" viewer="grid">
            <Command idref="db2zos.getIndexesTable">
               <Input name="tableCreator" value="${schema}"/>
               <Input name="tableName" value="${objectname}"/>
               <Input name="xtraCond" value=""/>
            </Command>
         </DataView>
         <DataView id="db2zos-materializedquerytable-source" icon="Source" label="Source" viewer="text">
            <Input name="formatSQL" value="true"/>

            <Command idref="db2zos.getViewSource">
               <Input name="owner" value="${schema}"/>
               <Input name="view" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="SystemTables">
         <DataView id="db2zos-systemtables-syscat" icon="SystemTables" label="SYSCAT" viewer="grid">
            <Input name="menuItem" value="Open in New Tab...">
               <Input name="action" value="open-object-in-new-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Open in Floating Tab...">
               <Input name="action" value="open-object-in-floating-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||CREATOR}${object||NAME}"/>
            </Input>

            <Command idref="db2zos.getSystemTables">
               <Input name="owner" value="SYSCAT"/>
            </Command>
         </DataView>
         <DataView id="db2zos-systemtables-sysfun" icon="SystemTables" label="SYSFUN" viewer="grid">
            <Input name="menuItem" value="Open in New Tab...">
               <Input name="action" value="open-object-in-new-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Open in Floating Tab...">
               <Input name="action" value="open-object-in-floating-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||CREATOR}${object||NAME}"/>
            </Input>

            <Command idref="db2zos.getSystemTables">
               <Input name="owner" value="SYSFUN"/>
            </Command>
         </DataView>
         <DataView id="db2zos-systemtables-sysibm" icon="SystemTables" label="SYSIBM" viewer="grid">
            <Input name="menuItem" value="Open in New Tab...">
               <Input name="action" value="open-object-in-new-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Open in Floating Tab...">
               <Input name="action" value="open-object-in-floating-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||CREATOR}${object||NAME}"/>
            </Input>

            <Command idref="db2zos.getSystemTables">
               <Input name="owner" value="SYSIBM"/>
            </Command>
         </DataView>
         <DataView id="db2zos-systemtables-sysstat" icon="SystemTables" label="SYSSTAT" viewer="grid">
            <Input name="menuItem" value="Open in New Tab...">
               <Input name="action" value="open-object-in-new-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Open in Floating Tab...">
               <Input name="action" value="open-object-in-floating-tab-command ${schema||CREATOR}${object||NAME}"/>
            </Input>
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||CREATOR}${object||NAME}"/>
            </Input>

            <Command idref="db2zos.getSystemTables">
               <Input name="owner" value="SYSSTAT"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Indexes">
         <DataView id="generic-indexes-indexes" drop-on-condition="always"/>

         <DataView id="db2zos-indexes-indexes" icon="Indexes" label="Indexes" viewer="grid">
            <Command idref="db2zos.getIndexesAll">
               <Input name="tableCreator" value="${schema}"/>
               <Input name="indexCreator" value="${schema}"/>
               <Input name="xtraCond" value="and UNIQUERULE NOT IN ('P','C', 'G')"/>
            </Command>
         </DataView>
      </ObjectView>
      
       <ObjectView type="TableIndexes">

         <DataView id="db2zos-indexes-tableindexes" icon="Indexes" label="Indexes" viewer="grid">
            <Command idref="db2zos.getIndexesTable">
               <Input name="tableCreator" value="${schema}"/>
               <Input name="tableName" value="${theTableName}"/>
               <Input name="xtraCond" value="and UNIQUERULE NOT IN ('P','C', 'G')"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Index">
         <DataView id="generic-index-index" drop-on-condition="always"/>

         <DataView id="db2zos-index-index" icon="Index" label="Index" viewer="node-form"/>
         <DataView id="db2zos-index-columns" icon="Columns" label="Columns" viewer="form">
            <Command idref="db2zos.getIndexColumns">
               <Input name="owner" value="${indexCreator}"/>
               <Input name="name" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>
      
      <ObjectView type="Sequences">
         <DataView id="db2zos-sequences-sequences" icon="Sequences" label="Sequences" viewer="grid">
            <Command idref="db2zos.getSequences">
               <Input name="owner" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Sequence">
         <DataView id="db2zos-sequence-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="db2zos-sequence-grants" icon="TablePrivileges" label="Grants" viewer="grid">
            <Command idref="db2zos.getSequencePrivileges">
               <Input name="owner" value="${db2zos.getSequences.SEQSCHEMA}"/>
               <Input name="name" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Triggers">
         <DataView id="db2zos-triggers-triggers" icon="Triggers" label="Triggers" viewer="grid">
            <Command idref="db2zos.getTriggers">
               <Input name="tbowner" value="${schema}"/>
               <Input name="table" value="${theTableName}"/>
               <Input name="triggerSchema" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Trigger">
         <DataView id="db2zos-trigger-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="db2zos-trigger-source" icon="Source" label="Source" viewer="text">
            <Input name="formatSQL" value="true"/>
            <Command idref="db2zos.getTableTriggerSource">
               <Input name="owner" value="${objectSchema}"/>
               <Input name="name" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Procedures">
         <DataView id="generic-procedures-procedures" drop-on-condition="always"/>

         <DataView id="db2zos-procedures-storedprocedures" icon="Procedures" label="Stored Procedures" viewer="grid">
            <Command idref="db2zos.getProcedures">
               <Input name="owner" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Procedure">
         <DataView id="generic-procedure-columns" drop-on-condition="always"/>

         <DataView id="db2zos-procedure-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="db2zos-procedure-interface" icon="Interface" label="Interface" viewer="form">
            <Command idref="db2zos.getProcedureParms">
               <Input name="owner" value="${db2zos.getProcedures.SCHEMA}"/>
               <Input name="procedure" value="${objectname}"/>
               <Input name="specificname" value="${db2zos.getProcedures.SPECIFICNAME}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Functions">
         <DataView id="db2zos-functions-functions" icon="Functions" label="Functions" viewer="grid">
            <Command idref="db2zos.getFunctions">
               <Input name="owner" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Function">
         <DataView id="db2zos-function-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="db2zos-function-parameters" icon="Input" label="Parameters" viewer="form">
            <Command idref="db2zos.getFunctionParms">
               <Input name="owner" value="${db2zos.getFunctions.SCHEMA}"/>
               <Input name="function" value="${objectname}"/>
               <Input name="specificname" value="${db2zos.getFunctions.SPECIFICNAME}"/>
               <Input name="rowtype" value="'P'"/>
            </Command>
         </DataView>
         <DataView id="db2zos-function-result" icon="Output" label="Result" viewer="form">
            <Command idref="db2zos.getFunctionParms">
               <Input name="owner" value="${db2zos.getFunctions.SCHEMA}"/>
               <Input name="function" value="${objectname}"/>
               <Input name="specificname" value="${db2zos.getFunctions.SPECIFICNAME}"/>
               <Input name="rowtype" value="'R','C'"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Packages">
         <DataView id="db2zos-packages-packages" icon="Packages" label="Packages" viewer="grid">
            <Command idref="db2zos.getPackages">
               <Input name="owner" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Package">
         <DataView id="db2zos-package-info" icon="Info" label="Info" viewer="node-form"/>
      </ObjectView>

      <!-- DBA views -->

      <ObjectView type="Users">

        <DataView id="db2zos-users-users" icon="Users" label="Users" viewer="grid">
           <Command idref="db2zos.getGrantees">
             <Input name="granteetype" value=" " />
             <Input name="grantee" value="%" />
          </Command>
        </DataView>
     </ObjectView>

     <ObjectView type="User">
         <DataView id="db2zos-users-user" icon="Info" label="Info" viewer="node-form"/>
       
         <DataView id="db2zos-users-databaseprivilege" icon="Privileges" label="Database Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysdbauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
         
         <DataView id="db2zos-users-schemaprivilege" icon="Privileges" label="Schema Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysschemaauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
         
         <DataView id="db2zos-users-tableprivilege" icon="Privileges" label="Table Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="systabauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
         
         <DataView id="db2zos-users-columnprivilege" icon="Privileges" label="Column Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="syscolauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
         
          <DataView id="db2zos-users-packageprivilege" icon="Privileges" label="Package Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="syspackauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="db2zos-users-routineprivilege" icon="Privileges" label="Routine Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysroutineauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="db2zos-users-planprivilege" icon="Privileges" label="Plan Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysplanauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="db2zos-users-resourceprivilege" icon="Privileges" label="Resource Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysresauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>
      
      <ObjectView type="Roles">
         <DataView id="db2zos-roles-roles" icon="Roles" label="Roles" viewer="grid">
            <Command idref="db2zos.getRoles"/>
         </DataView>
      </ObjectView>
 
      <ObjectView type="Role">
         <DataView id="db2zos-role-info" icon="Info" label="Info" viewer="node-form"/>
          <DataView id="db2zos-role-databaseprivilege" icon="Privileges" label="Database Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysdbauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
         
         <DataView id="db2zos-role-schemaprivilege" icon="Privileges" label="Schema Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysschemaauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
         
         <DataView id="db2zos-role-tableprivilege" icon="Privileges" label="Table Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="systabauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
         
         <DataView id="db2zos-role-columnprivilege" icon="Privileges" label="Column Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="syscolauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
         
          <DataView id="db2zos-role-packageprivilege" icon="Privileges" label="Package Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="syspackauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="db2zos-role-routineprivilege" icon="Privileges" label="Routine Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysroutineauth"/>
               <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="db2zos-role-planprivilege" icon="Privileges" label="Plan Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysplanauth"/>
                <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="db2zos-role-resourceprivilege" icon="Privileges" label="Resource Privilege" viewer="grid">
            <Command idref="db2zos.getAuth">
               <Input name="table" value="sysresauth"/>
                <Input name="grantee" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>
     
      <ObjectView type="Tablespaces">
         <DataView id="db2zos-tablespaces-tablespaces" icon="Tablespaces" label="Table Spaces" viewer="form">
            <Command idref="db2zos.getTableSpaces"/>
         </DataView>
      </ObjectView>
      
      <ObjectView type="Tablespace">
        <DataView id="db2zos-tablespace-columns" icon="Info" label="Info" viewer="form">
           <Command idref="db2zos.getTableSpace-columns">
           </Command>
        </DataView>
      </ObjectView>
      
      <ObjectView type="Databases">
        <DataView id="db2zos-databases-databases" icon="Databases" label="Databases" viewer="form">
           <Command idref="db2zos.getDatabases"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Database">
         <DataView id="db2zos-database-columns" icon="Info" label="Info" viewer="form">
            <Command idref="db2zos.getDatabase-columns">
            </Command>
         </DataView>
      </ObjectView>
      
      <ObjectView type="Storagegroups">
         <DataView id="db2zos-storagegroups-storagegroups" icon="Storagegroups" label="Storage Groups" viewer="form">
            <Command idref="db2zos.getStorageGroups"/>
         </DataView>
      </ObjectView>

     <ObjectView type="Storagegroup">
         <DataView id="db2zos-storagegroup-columns" icon="Info" label="Info" viewer="form">
            <Command idref="db2zos.getStorageGroup-columns">
         </Command>
         </DataView>
     </ObjectView>

   </ObjectsViewDef>

</DatabaseProfile>
