Previous Topic

Next Topic

Book Contents

Book Index

Variable functions

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

%%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

%%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

Control-M Variable facility