PowerDesigner Formatting Variables

Variables have a syntax that can force a format on their values, as follows:


  • Force values to lower-case or upper-case characters

  • Truncate the length of values

  • Add single or double quotes

When a variable does not specify formatting, its values have the same format as in the PDM.

Format code

Format of variable value in script

.L

Lower-case characters

.q

Enclose the variable between single quotes if it is not already.

.Q

Enclose the variable between double quotes if it is not already.

.T

Removes blank spaces

.U

Upper-case characters

.c

Upper-case first letter and lower-case next letters

.n

Maximum length where n is the number of characters

nJ

Justifies to fixed length where n is the number of characters

-nJ

Right justify variable text to fixed length where n is the number of characters

You embed formatting options in variable syntax as follows:

%.format:variable%

For example:

%.L:TABLE%

The table below shows formatted variables and their results in a script for the table EMPLOYEE.

Template statement with variable

Resulting script statement

create trigger %TABLE%

create trigger EMPLOYEE

create trigger %.L:TABLE%

create trigger employee

create trigger %.U:TABLE%

create trigger EMPLOYEE

create trigger %.4:TABLE%

create trigger EMPL

create trigger %.4L:TABLE%

create trigger empl


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com