General Transform Syntax

This section defines general syntactic rules applying to all transforms. For syntax specific to individual transforms, see“Transforms” on page 17. The syntax of each transform is also displayed as a pop-up when you move the mouse over the function's name in the Functions and Constants list in the Content Assistant dialog.
Transform Syntax
The symbols $, !, and ; have special meanings in transforms.
  • The dollar sign ($) is a special key symbol provided in case there is ever a name conflict between one of your variables and the name of a transform function or keyword. In that situation, when the word appears without an initial $, it is taken to refer to your variable. When the word appears with an initial $, it is taken to refer to the function or keyword. If there is no name conflict, the $ is allowed but not necessary.
  • The exclamation point (!) must be used to surround variable names that contain characters other than alphanumeric or that consist solely of numerals. Except as noted below, !s is optional for any other variable names.
  • The semicolon (;) a transform expression (but not inside a variable name surrounded with !s) causes the remainder of the expression to be treated as a comment. This feature can be used to attach initials or explanations to transforms. It can also be used to suppress or comment out a transform without removing it from the transform list. However, you cannot make a transform that consists solely of a comment without a valid expression. For example, to suppress a transform the following transform:
!A! = $ln(!A!)
you could modify it to the following:
!A! = !A!; $ln(!A!)
When you create a new variable, its name can be any valid name that you wish; it does not have to match or indicate any variable in your process. Valid names must not be longer than 72 characters and may not contain an exclamation point (!), a double quote ("), or any type of curly brace ({}).
Expressions can include extra blank spaces, tabs, and redundant parentheses. Names of variables, functions, and constants are not case-sensitive. Sometimes we display and document them in uppercase or mixed case, but this is solely for ease of recognition.
If the output of a transform is the same variable as one of its inputs, you can substitute the symbol $self instead of repeating the name of the input.
Numeric constants can be entered in decimal or scientific notation.
Date/time constants are specified as date followed by time, separated by at least one space, surrounded by backslash (\) characters. The date and time must be in a form that the parser can recognize. The recommended form is
\mm/dd/yy hh:mm:ss.ttt\
with seconds and thousandths optional. There are additional forms that can be recognized, including
\3 days\
and
\4.1 hours\.
Character string constants must be surrounded with either double quote (") or single quote (') characters. There are two options for typing a character string constant with embedded quotes. Either type the embedded value twice or surround the string with the other quote style. For example,
  • The string
    ab"cd
    can be typed as either
    "ab""cd"
    or
    'ab"cd'
    .
  • The string
    ab'cd
    can be typed as either
    'ab''cd'
    or
    "ab'cd"
    .
Also note that if your keyboard features a back-quote character (`), also called a left-quote, that character is not interchangeable with the regular single quote or double quote.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.