Introduction

Halcyon allows you to create substitution variables that can then be used in commands, and message strings, defined in Halcyon products. The variable is replaced with the effective value when the command runs or when the message is sent. 

This example shows you how to create a variable that will return the (current day - 30 days) date in MDY format.

To achieve this, you must create two substitution variables, one to subtract the days and a second to put it into the correct format. 

Create the 1st variable

GO HALCYON > 42 > 9

Work with Substitution Variables

Use F6 to create the new variable.

Create new  Substitution Variable

  1. Give the variable a Name
  2. And a Description
  3. This is a variable based on a type of *DATE
  4. And it is 8 Characters long
  5. The new variable is based on an existing variable &DATE
  6. We want to subtract a number of days from the existing variable
  7. 30 is the number of days to be subtracted

Once created you can select option 5 against the variable, and, where possible, the screen will show the value that will be returned: 

Display Substitution Variable

Create the 2nd variable

GO HALCYON > 42 > 9

Work with Substitution Variables

  1. Give the variable a Name
  2. And a Description
  3. This is a variable based on a type of *CHAR
  4. And it is 6 Characters long
  5. The new variable is based on the previously created variable &DATE_30
  6. We want this variable to be in a *DATEFMT format
  7. MMDDYY  is the required date format

Once created you can select option 5 against the variable, and, where possible, the screen will show the value that will be returned: 

Display Substitution Variable


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: May 29, 2020