A variable function performs an action or process on the specified user variable or job submission variable. Variable functions are used instead of another expression. The following functions are available:
Variable Functions
Function |
Description |
---|---|
"%%CALCDATE and %%$CALCDATE" |
Adds or subtracts a specified number of days from a specified date. Same as %%CALCDATE, but handles 4-digit years. |
%%GETENV <environment variable> |
Retrieves the value of an environment variable. |
"%%SUBSTR" |
Extracts a substring from a specified string. |
%%CALCDATE and %%$CALCDATE
%%CALCDATE is a numeric function that adds or subtracts a quantity of days from a given date. This function has the following format:
result=%%CALCDATE date +|-quantity
NOTE: On July 2, 2005, %%A resolves to 050630 in any of the following expressions:
NOTE: On July 2, 2005, %%A resolves to 20050630 in any of the following expressions
%%SUBSTR
%%SUBSTR is a string function that is used to extract a substring from within a larger string. This function has the following format:
result=%%SUBSTR variable startpos length
NOTE: The values specified for both <startpos> and <length> must be (or resolve to) a number greater than zero
NOTE: In the body or message of an email, %%SUBSTR should be the last statement, for example:
NOTE: In the following series of expressions, %%Number resolves to TWO:
%%GETENV <environment variable>
This function retrieves the value of an environment variable. It has the following format: result=%%GETENV <environment variable>.
NOTE: %%A=%%GETENV HOME
%%A resolves to the Control-M/Server user home directory.
Parent Topic |