Inserting Begin and End Scripts for Table and Tablespace Creation

For each table and tablespace, you can insert a Begin script after the table title and an End script after the table or tablespace creation command.

These scripts can appear in database creation scripts and database modification scripts.

  1. Open the property sheet of the tablespace and click the Script tab.
  2. Enter a Begin and/or End script as necessary on the appropriate subtab. You can use the following variables in these scripts:

    Variable

    Description

    %DATABASE%

    Code of the current PDM

    %DATE%

    Date of script generation

    %DBMSNAME%

    Code of the DBMS for the target database

    %NAMESCRIPT%

    Filename of script file

    %PATHSCRIPT%

    Filename and path of script file

    %STARTCMD%

    Command that runs the script

    %TABLESPACE%

    Code of the tablespace

    %OPTIONS%

    Physical options of the tablespace

    %AUTHOR%

    Author of the current model

    %COLNLIST%

    Column list

    %DBMSNAME%

    Code of the DBMS for the target database

    %OWNER%

    Table owner

    %OWNERPREFIX%

    Owner prefix of table owner

    %TABLE%

    Name or code of current table (based on display preferences)

    %TCODE%

    Code of the current table

    %TLABL%

    Label of the current table

    %TNAME%

    Name of the current table

    For a complete list of the variables available and how to format them, see Customizing and Extending PowerDesigner > DBMS Definition Files > PDM Variables and Macros.

  3. Click OK to close the database property sheet and return to your model.